<

LESSON 4 - Part 1:  Graphic States, Sprites & Draw Groups

Modifying The Individual Behaviors

Replace the zero in Parameter 2 with the number "1".


Fig. 1.24

Open #4171, the TEST for the blue bed. We’re going to say that if this bed isn’t already blue, then it can change to blue. Remember that the attribute for the original bed is zero and for the blue bed it is 1. Change Parameter 2 to a number 1.


Fig. 1.25

Go ahead and modify the behaviors for the rest of the beds.

Pink = 2
Orange = 3
Purple = 4
Green = 5

Zero through 5 = 6 graphic state changes.

Creating The Menu

The next thing we’ll do is to create a decent menu so when a Player clicks on our fabulous Pet Bed, he will be able to see all options and then choose from the available assorted colors. Be sure you have all your behavior numbers written down so we can have them handy for insertion into the menu Action and Check trees.

Note: If your program is in a language other than English, don’t forget to modify your TTAs section as well.