Game Development Reference
In-Depth Information
Note The following instructions show how to set up constants for use in our game. However, you won't
be able to create these constants unless you have a registered Pro version of Game Maker 8. If you are
using the Lite version of Game Maker, then you can achieve the same effect by creating a variable of the
same name and value. You need to do this in the obj_pod object, which isn't created until a bit later, so
we'll remind you to do it then. For the time being, if you are using the Lite version, then simply ignore the
next four instructions and carry on as normal afterwards.
Adding Constants for Facing Left and Facing Right
1.
From the Resources menu, select Define Constants . The User-Defined Constants form
will then appear, as shown in Figure 2-10.
Click on Add and type FACE_LEFT (with an underscore between the words).
We recommend using all capitals for constants so that you can easily
identify them as constants when you use them in your actions. Press the
Tab key and type 1 . This assigns a value of 1 to the constant FACE_LEFT .
2.
Click on Add again and type FACE_RIGHT . Press the Tab key and type 2 . This assigns a
value of 2 to the constant FACE_RIGHT .
3.
4.
Click OK to close the form.
Figure 2-10. The User-Defined Constants form
 
Search WWH ::




Custom Search