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

Creating attack pattern 1

To make this fight more interesting, let's start writing the attack patterns.

Prepare for lift off

The thing with attack patterns is figuring out an interesting movement pattern first and then finding a way to create a script that moves the sprite according to that pattern. For this game, we will create three very distinct movement patterns.

The first one will be to move the boss in a pattern similar to the number 8. The number 8 will be lying horizontally, so the boss sprite will appear to be bobbing back and forth and weaving around the player character.

Prepare for lift off

Engage thrusters

We will start this pattern when the correct message ...

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