User Guide

109
The if block and costume changes cycle the sprite through the
four frames of animation that show the character walking.
An invisible sprite will broadcast two other messages: FakeWalk
and MoveToGBilly. These are used later, so add these two
scripts to the Billy sprite:
When the player presses the Z key to punch or the X key to kick,
the Billy sprite changes costume. It then waits, so the player has
time to see the attack and enemies have a chance to be hit,
before changing the costume again. Note that kicking has an
extra costume (an extra frame of animation).
Add these scripts to Billy:
At this point, the player sprite can move across the Stage. But it
can move anywhere on the screen (including up into the air and
through walls) and the movement of the sprite does not cause
The ghost sprite is not created until section 5.4 Collision
Detection on page111. If you want to test the movement with
the keyboard, add scripts that broadcast and wait the move
messages when the arrow keys are pressed.