Adding introductory text to each level
We have a good end to the levels, but the player may not be sure what to do. What we need is a bit of a story to sell the idea of destroying towers and explaining what it is the player needs to do in each level. To do this we will add a screen, much like the Score Screen at the start of each level:
- We will need a button to start the level, which again will need to be drawn on screen. Create a new Script,
scr_Menu_Button_Start
, with some very familiar code:draw_sprite(spr_Button_Start, 0, startX, startY); if (win_Y > startY - start_ZoneHeight && win_Y < startY + start_ZoneHeight) { if (win_X > startX - start_ZoneWidth && win_X < startX + start_ZoneWidth) { draw_sprite(spr_Button_Start, 1, startX, startY); if ...
Get HTML5 Game Development with GameMaker now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.