Game Development Reference
In-Depth Information
Objective complete - mini debriefing
That concludes seing up the basic properies of the boss. It will disappear and appear on
the screen when required, and it will atempt to start an atack patern. Of course, it won't
actually move because the message receivers and movement paterns haven't been writen
yet. At this point, we could check whether the hitCount value goes up when we hit the
boss with a spear. Shooing a staic enemy is a lot easier for tesing.
Check the checkboxes for hitCount and speed to see the values change when tesing
this game.
Creating attack pattern 1
To make this ight more interesing, let's start wriing the atack paterns .
Prepare for lift off
The thing with atack paterns is iguring out an interesing movement patern irst
and then inding a way to create a script that moves the sprite according to that patern.
For this game, we will create three very disinct movement paterns.
The irst one will be to move the boss in a patern 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.
Engage thrusters
We will start this patern when the correct message is called. Since this is the irst patern
that we make, we have named it pattern1 .
1. We add a new script staring with when I receive <patern1> .
2. Then we use set rotaion style <all around> so that the sprite can move about freely
and make loops as it goes.
3. We move the sprite to the center of the screen with glide 1 secs to x: () y: () ; fill in
the values as 0 and 0 respecively.
4.
Then we point the sprite using point in direcion () with value -135 . This points it to
the botom-let.
 
Search WWH ::




Custom Search