Name: __________________________________________
Copyright
by
The
Goodheart-Willcox
Co.,
Inc.
Lesson 10 The Key to Adventure—Beta 161
Blowing up the Doors
To make the doors blow up and allow the avatar to pass, programming needs to be added
to the OBJ_Explode object. This will also correct the problem with the repeating explosion.
36. Open the Object Properties dialog box for the OBJ_Explosion object.
37. Program this logic statement: IF the explosion collides with the doors, THEN destroy the
doors. Note: this is an example where you might want to use the Other setting because
using the Object setting will destroy all doors.
38. Program this logic statement: IF the explosion animation ends, THEN destroy the
explosion. See Figure 10-5.
39. Test play the game to see if the doors explode and that the explosion does not repeat.
40. Debug the game if needed.
41. Save your work.
Block of code for
exploding the dynamite
Figure 10-4
Click
Select
Figure 10-5
Run the
Game