O'Reilly logo

Scratch 2.0 Game Development HOTSHOT by Sergio van Pul, Jessica Chiang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required