CMCharacter Modules 0.1.0

Jump

Kind: State · Add Component: Character Modules > States > Jump

Leaves the ground on a button press. Every other jump is a variation of this one.

Leaving the ground on a button press. Every other jump in the package (double, long, backflip, wall kick...) is a shape of this one, chosen when it starts; so one Jump module plus the shapes you add is the whole jump set of a genre.

Inspector
▼Jump⋮
CharacterCharacter (Character Motor)
Jump Height1.2
The Jump component in the Inspector, with its defaults.
Origin. Donkey Kong (1981) gave the first game character a jump button.

How it works

An action of Walking that leads to Falling. Starts from any state, on: Jump. Ends when it stops rising, then the Falling mode and the Walking mode.

Leaving the ground on a jump press, then rising until the top of the jump. While rising it moves exactly like the character's air state (it calls AirMoveState.AirMove), so it needs one.

Hooks called: IJumpGate, to decide whether the jump may start (Coyote Time, Jump Buffering and Wall Kick work through it); IJumpMove, to replace the plain jump with a special one (Jump Chain, Side Flip, Wall Kick); IJumpLaunch, to adjust the take-off (Running Jump).

Combine it

  • Needs: Air Move. The Inspector warns while one is missing.
  • Priority 20: when several states could run, the highest priority wins (see How modules combine).
  • Used by the presets: Arena Shooter, Competitive Shooter, Surf, Retro Platformer, Modern Platformer, Traversal Adventure, Action RPG.

Properties

PropertyDescriptionRangeDefault
CharacterThe character this module belongs to. Drag its Character Motor here.None
Jump HeightHeight of the top of the jump above the take-off point, metres.0 or more1.2

Additional resources