Level 4 - Bombs


Create a maze that is closed and add bombs and triggers to blow walls open.
The idea is that when the player gets to the trigger, all bombs explode, destroying everything in their neighborhood.
This can be used to create holes in walls and to destroy monsters.


You will need three new objects: a trigger, a bomb, and an explosion.

The bomb is extremely simple. It just sits there and does nothing. To make sure monsters move over it (rather than under it) we set its depth to 10.
Object instances are drawn in order of depth. The ones with the highest depth are drawn first. So they will lie behind instances with a smaller depth.
By setting the depth of the bomb to 10 the other objects, that have a default depth of 0, are drawn on top of it.

When the trigger and the person collide we will turn all the bombs into explosions. You can do this on the person or the trigger.



Explosion Strip


Explosion Sprite

Create an explosion object to show the animation. After the animation, it destroys itself. (You have to be careful that the origin of the explosion is at the right place when turning a bomb into it. Try 32 x 32 first) The object also must destroy everything it touches. This requires a little bit of work. First of all, we do not want the explosion to destroy itself so we move it temporarily out of the way. Then we use actions to destroy all instances at positions around the old position of explosion. Finally we place the explosion back at the original place.

For each wall indicate the type of wall under object and the position of the wall

Make sure the triggers are not next to the bombs.

It is important to carefully design the levels with the bombs and triggers, so that they present interesting challenges. You mark will be based in part on the layout of the level.