Game Development Reference
In-Depth Information
10. Repeat steps 5-9 to check for obj_slope_u2 using the same settings for the Set Gravity
and Set Variable actions. If you want to cut and paste the five actions, then try including
a Comment action ( control tab) at the very end of the list of actions first. Highlight the
five actions (hold control and left-click each one) and then right-click and select Copy .
Next, right-click on the Comment action and select Paste . The actions should appear in
front of the comment, allowing you to repeat the procedure.
11. Repeat steps 5-9 to check for obj_slope_u3 using a Direction of 225 for the Set Gravity
action and an image_index of 1 for the Set Variable action. Again we have to add 180 to
45 to get an angle sloping dowards to the left.
12. Repeat steps 5-9 for obj_slope_d1 using a Direction of -45 and image_index of 3 .
13. Repeat steps 5-9 for obj_slope_d2 using a Direction of -22.5 and image_index of 4 .
14. Repeat steps 5-9 for obj_slope_d3 also using a Direction of -22.5 and image_index of 4 .
There should now be 33 actions in the Begin Step event for obj_zool_ice , as shown in
Figure 4-18.
15. Add a Step, End Step event and include a Check Object action ( control tab) that checks
for the Object obj_slope , NOT at a Relative position of X = 0 , Y = 1 . This next series of
actions will be similar to the ones that help Zool to walk down ramps smoothly, but a bit
more complicated, as it needs to check for both slopes and platforms.
16. Follow this with a Start Block action.
17. Include a Check Object action that checks for the Object obj_slope , at a Relative
position of X = 0 , Y = speed . This checks if there is actually a slope a bit further below
Zool's feet that he could move down onto.
18. Follow this with another Start Block action.
19. Include a Move to Contact action ( move tab) with Direction set to 270 , Maximum set
to -1 , and Against set to all objects . This brings Zool back down on top of the slope if
there is one to move down onto.
20. Follow this with an End Block action ( control tab).
21. Include an Else action.
22. Follow this with another Start Block action.
23. Include a Check Object action ( control tab) that checks for the Object obj_platform , at
a Relative position of X = 0 , Y = 1 . This checks if Zool is actually standing on a normal
platform if he's not standing on a slope.
24. Include a Change Instance action ( main1 tab) that will change into obj_zool_land and
Perform Events ( Destroy and Create ) as it does so. If he is on a normal platform, then
he needs to switch state.
25. Include an Else action (check Figure 4-19 if you're losing track).
26. Include a Change Instance action ( main1 tab) that will change into obj_zool_air and
Perform Events ( Destroy and Create ) as it does so. This will start Zool falling if he isn't
sliding down a slope or supported by a normal platform.
27. Include an End Block action ( control tab).
28. Include a second End Block action. There should now be 14 actions in the End Step
event for obj_zool_ice , as shown in Figure 4-19.
 
Search WWH ::




Custom Search