Name: __________________________________________
Copyright
by
The
Goodheart-Willcox
Co.,
Inc.
Lesson 10 The Key to Adventure—Beta 167
88. Drag the Set Lives button from the Score tab and drop it into the Actions: column.
89. In the Set Lives dialog box, enter –1 in the New lives: text box, check the Relative
check box, and click the OK button to save the action.
90. Drag the Jump to Start button from the Move tab and drop it into the Actions:
column. The Jump to Start dialog box is displayed, Figure 10-12.
91. Click the Object: radio button. Then, click in the text box that appears and select the
avatar from the shortcut menu. This will return the player to the starting position, which is
called respawning. In this case, the respawn checkpoint is the starting position.
92. Click the OK button to save the action.
93. Drag the Test Lives button from the Score tab and drop it into the Actions: column.
94. In the Test Lives dialog box, enter 0 in the Value: text box, click in the Operation: text
box and select Equal to from the shortcut menu, and click the OK button.
95. Drag the End Game button from the Main 2 tab and drop it into the Actions: column,
Figure 10-13.
Set
Lives
Jump to
Start
Test
Lives
Select the avatar
to return to its
starting position
Figure 10-12
Code for removing lives
and ending the game
Figure 10-13
End
Game
Previous Page Next Page