Game Development Reference
In-Depth Information
The final script will look like the following screenshot:
This is all that is absolutely necessary for this script. As you can see, the imer is sill running
and will eventually reach 90. This would cause the boss message to be called again. We don't
want that as it could cause strange results. So, we will take a few precauions to prevent the
imer from ever reaching 90.
Stopping the imer altogether would be a great opion, but unfortunately Scratch doesn't
allow that. The precauions to be taken are as follows:
1. We atach a forever loop after the broadcast block.
2. Inside the loop, we place an if () then block.
3. The condiion will check whether imer > () with value 80 .
If this is the case, we sneakily use reset imer so that it will start over from 0 .
Objective complete - mini debriefing
Ater we start a new game, we can press the B key to immediately jump to the batle against
the boss. We make sure the spear has some random upgrades so that we can see the effect.
We also make sure the imer that's set for the usual game low doesn't bother us.
We can now quickly skip to and test the boss fight without first having to play through a
wave of enemies.
Search WWH ::

Custom Search