Game Development Reference
In-Depth Information
8.
Open
obj_flynn_wall
and edit the
End Step
event. Change the line at the start of the
action that reads:
if( place_meeting( x+facing, y, obj_wall ) != true )
to:
if( is_climbable( facing, 0 ) != true )
9.
Still in the
End Step
event of
obj_flynn_wall
, remove the middle two lines (plus the
comment) that cope with Flynn extending too high above the top of the wall (by
making him slip down). Happily, this situation can't happen anymore as there has to
be a wall at Flynn's hand position in order for
is_climbable
to return
true
.
10.
Next, change the last line that sets
image_index
to
0
so that it sets
image_speed
to
0
instead. This will stop Flynn from snapping back to the first frame of the animation
each time he stops climbing. Stopping the speed will bring the animation to a halt on
its current frame instead, which looks more natural.
11.
Edit the
Begin Step
event for
obj_flynn_wall
and add the following line directly above
the line that defaults the
state
to
FSTATE_CLING
.
if( state != FSTATE_CLIMB_TOP )
This prevents the state from being changed back to clinging when the climbing up
animation has started. It's also worth indenting the line after it to keep things tidy.
Search WWH ::
Custom Search