Adding a test script
Before we dive into the excitement of creating the boss enemy, let's first do something smart and create a script that helps us to test the boss that we create.
Prepare for lift off
As you may have noticed while testing the game, waiting 90 seconds for the boss to appear is a rather long time. We could just decrease the wait time in the script, but that has a few drawbacks.
It would be more difficult to test the wave phase of the game, since the timer runs for such a short time.
We run the risk of forgetting to change the timer before finally publishing the game.
A better option is to create a separate temporary script that we can throw away when we have finished the game without any risk to all our hard work.
Engage thrusters
We will add this script to the Stage sprite. This is often the best place for these kinds of control scripts.
When a certain button is pressed, we will change the ordinary flow of things, as follows:
Start a new script with a when <b> key pressed...