Game Development Reference
In-Depth Information
2.
Add a
Keyboard, Down
event and include a
Set Variable
action (
control
tab) that sets
state
to
ZSTATE_SPIN
.
3.
Include a
Set Variable
action that sets
attacking
to
true
.
4.
Right-click on the
Keyboard, Down
event and
Duplicate Event
as a
Keyboard, Up
event.
5.
Select the
End Step
event and include a
Test Variable
immediately after the
Start
Block
action to test if
state
is
NOT equal to
ZSTATE_SPIN
. We want the player to be able
to spin while falling and jumping, so we don't want to override the state here. The
actions for the
End Step
event should now look like those shown in Figure 6-4.
Now give your new ninja skills a whirl. One nice side effect of the way this works is that you
tend to end up putting Zool into a spin when he automatically jumps at the top of a wall. This
makes it easy to elegantly demolish any enemies waiting at the top in the process.
Figure 6-4.
The End Step event for obj_zool_air
Shooting Stars
The ability to shoot is something fairly unusual for platform games, as it can potentially make
them a bit too easy. Shooting was a core skill for Zool, so we felt it had to be included, but we
wanted to do it without making it the dominant strategy. We tried out a range of controls,
including using the up arrow key to jump and the space bar to shoot. Putting the shooting
mechanic on the primary key (space bar) made it much easier to shoot, but turned the game into
more of a platform-based shoot-'em-up. This wasn't what we wanted, so we decided that the
primary key should be the jump key and there should be a secondary fire key. This makes the
player use the shooting mechanic more sparingly and restores the prevalence of jumping as the
core-mechanic of our platform game:
Search WWH ::
Custom Search