Game Development Reference
In-Depth Information
Figure 4-16. The actions for the End Step event of the land Zool state object
10. Reopen obj_zool_air and add a Collision event with obj_ramp . Again, this creates a
specific collision event for obj_ramp to override the general obj_solid collision event
that was making Zool slip down ramps. Include a Set Variable action that sets the
Variable y Relative to -speed .
11. Include a Move to Contact action ( move tab) with Direction set to 270 , Maximum set
to -1 , and Against set to all objects . This places Zool on the ramp as before.
12. Include a Change Instance action ( main1 tab) that will change into obj_zool_land and
Perform Events ( Destroy and Create ) as it does so. We have just placed Zool on top of
a ramp, so obviously he will need to be in the land state.
Play the game now and ramps should be working in the way you would expect them to, so
let's continue to think about slopes….
Sliding Down
The original Zool game included slippery slopes as a feature in many levels. These would make
the player automatically (and uncontrollably) slide down towards the bottom. The only way of
getting up these slopes was to repeatedly jump like you were trying to climb a descending
escalator. The icing-covered slopes toward the top right of the test room are supposed to behave
in this way and that's what we will implement next. This is going to require behaviors for our final
state object, obj_zool_ice , but before we start implementing these, let's break down the problem
a bit more.
If you consider all of the slope collision objects in the Platforms and Slopes groups, you will
see that there are only five different gradients of slopes:
 
Search WWH ::




Custom Search