Game Development Reference
In-Depth Information
To control the behavior of the script, we will create a few variables.
All these variables are local to a single sprite, so we have to make the proper seings.
1. We need a few different variables. These variables are set to for this sprite only .
hitCount : This variable determines the number of hits the boss can take
before being defeated.
speed : This variable determines how fast the boss will move across
the screen.
turnStep : This variable determines how many degrees the boss will
turn between each step. This will be used in one of the attack patterns
that we write.
2. We also create a list to hold the broadcast messages for the atack paterns.
3. We name the list attack patterns .
4. We fill the list with the following three items/words:
pattern1
pattern2
pattern3
 
Search WWH ::




Custom Search