Game Development Reference
In-Depth Information
Figure 4-11. We check to make sure that there would still be a wall object above and to the right of Zool after
climbing up another 4 pixels
6.
Include an Else action at the end of the actions list. This adds a separate condition for
when Zool is climbing up but there is no longer an obj_wall above and in front.
7.
Include a Start Block action to group the following actions.
Include a Speed Vertical action ( move tab) with Vert. Speed set to -16 . This will make
Zool automatically jump up when he reaches the top of the wall.
8.
Include a Speed Horizontal action with Hor. Speed set to facing . This will give Zool a
very small push toward the wall he is facing as he jumps up. You might think this is
pointless, as he will immediately collide with the wall and stop moving horizontally
again. But remember that we maintain the horizontal speed in collisions, provided it is
less than MAX_DRIFT_SPEED , so he will keep this speed until he is clear of the top of the
wall and it will bring him neatly onto the top edge of the platform.
9.
Include a Change Instance action ( main1 tab) that will change into obj_zool_air and
Perform Events ( Destroy and Create ) as it does so.
10.
11.
Include an End Block action ( control tab). There should now be a sequence of 11
actions in the Keyboard, Up event for obj_zool_wall , as shown in Figure 4-12.
 
Search WWH ::




Custom Search