Game Development Reference
In-Depth Information
10. Include a Set Variable action that sets state to ZSTATE_KICK .
11. Include a Set Variable action that sets attacking to true .
12. Include a Set Friction action ( move tab) that sets Friction to 0.67 .
13. Include a Test Variable action ( control tab) that checks if speed is larger than 2 .
14. Follow this with a Play Sound action ( main1 tab) that plays snd_skid .
15. Include an End Block action ( control tab).
16. Include a Test Variable action that tests if speed is equal to 0 .
17. Follow this with a Set Variable action that sets image_index to 1 . The kicking sprite has
two images, one with the leg raised during the skid and one lowered for when Zool has
come to a halt, so these actions will set the correct subimage.
18. Include an Else action.
19. Follow this with a Set Variable action that sets image_index to 0 . The Keyboard, Down
event should now have 12 actions in it, as shown in Figure 6-3.
Figure 6-3. The Keyboard, Down event for obj_zool_land
 
Search WWH ::




Custom Search