Game Development Reference
In-Depth Information
3. When it has exploded, we can set the
hide
block to hide the bomb sprite again:
The next step is to create scripts for the
hole
sprite. This will mainly respond to the
createHole
message we just added. Perform the following steps:
1.
First, copy a
createMaze
listener to this sprite as well but not the one we just edited
for the bomb, because this sprite shouldn't change in size.
2.
Then, create a second script to receive the
createHole
message, staring with a
when I receive <createHole>
block.
3.
Set the
go to <bomb>
block.
4.
The hole will add a
broadcast
block to broadcast another message for later use.
Name this new message
kaboom
.
5.
Then, set the
wait 0.1 secs
block to create a small delay for the effect.
6.
Add the
show
block to the sprite.
7.
Add the
stamp
block to stamp it onto the stage. Any black segments underneath the
sprite will now be overwriten.