Game Development Reference
In-Depth Information
4. Now this script will wait for the message instead of staring when the <green lag>
is clicked on.
To stop and remove the Starfish enemies when the boss phase of the game is reached,
we need to add a third script as follows:
1. Start with another when I receive () block.
2. We now choose the other message called boss .
3. When this message is received, we first hide the sprite (using hide ).
4. Then we use stop <other scripts in sprite> to stop the starfish from working.
5. We can copy this script to the other two starfish enemies.
6. We also need to replace the when <green lag> clicked block with a when I receive
<waves> block, just like the first enemy.
The final script will look like the following screenshot:
Objective complete - mini debriefing
When we test the game again, we won't noice any diference. Staring the game will sill
spawn enemies wave after wave, provided we set up everything properly. If we can survive
unil the imer reaches 90 seconds, we will see a change. At this point, the boss message will
be broadcast. The enemies will respond by disappearing.
The diver can sill move about, and the background will keep scrolling. Other than this,
nothing exciing happens. We will change that in the rest of this project.
 
Search WWH ::




Custom Search