Game Over

Before designing Level 2, Create the Game Over Screen.


138 Add a layout and event sheet for the game over screen

139 On Level 1 Layout

Make the background layer GLOBAL

(Select Background Layer and change the Global property to Yes

This is so that we can use it on every new layout

140 On the Game Over Layout, rename Layer 0 to Background

141 Create a new layer at the top.

Name it Button

142 Use these images for GameOver, Play and Quit

143 Add the Sprites to the Level Folder

144 Add the images to the Button Layer

145 Add code to the Player Death Script

146 Add the Mouse object to the Plugins folder.

Now we can click on Buttons.

Add the Browser object to the Plugins folder.

Now we can close the program.

147 Include the Background event sheet in Game Overs Event Sheet

148 Add a new global variable to the evGlobals Event Sheet

This is so we know which Level to return to.

149 In the Level1 Event Sheet

Record the current Layout Name.

150 In the Game Over Event Sheet.

Add Code to Quit the game and Restart the Level.

151 Add Music to the Game Over Screen