Game Development Reference
In-Depth Information
3. Add an Other, Outside Room event and include the Wrap Screen action ( move tab)
with Direction set to horizontal. We have a relatively small room, so this will help us to
maximize the available space. Remember that we have added platform objects beyond
the edges of the room so that Zool can wrap smoothly.
4. Add a Draw event. Adding this Draw event to the parent will not just disable drawing
for this object, but all its children as well. So next we will include actions to draw the
appropriate sprite for all the different states—otherwise Zool will not appear!
5. Include a Test Variable action ( control tab) that tests if the Variable facing is equal to
the Value FACE_RIGHT .
6. Immediately follow this with a Start Block action to group the following actions
together under this test.
7. Include a Test Variable action that tests if the Variable state is equal to the Value
ZSTATE_STAND .
8. Immediately follow this with a Draw Sprite action ( draw tab) that draws
spr_zool_stand_right at a Relative position of X = 0 , Y = 0 .
9. Include a Test Variable action ( control tab) that tests if the Variable state is equal to
the Value ZSTATE_WALK .
10. Immediately follow this with a Draw Sprite action ( draw tab) that draws
spr_zool_walk_right at a Relative position of X = 0 , Y = 0 .
11. Add an End Block action ( control tab) to end the group of actions.
12. Now repeat steps 5-11, replacing FACE_RIGHT with FACE_LEFT and right-facing sprites
with left-facing ones, appropriately. Once completed, this event should contain the
actions shown in Figure 3-7.
 
Search WWH ::




Custom Search