Voxel Game Maker

Docs Cookbook

Wall jump

Place the wall to kick off (a Stone wall, two or three blocks high), with a ledge the player can't reach with a plain jump.

#Without code

  1. Place the wall to kick off (a Stone wall, two or three blocks high), with a ledge the player can't reach with a plain jump.
  2. Switch to Advanced. With it picked, click + Add behavior ▸ Logic ▸ Trigger.
  3. Set When to Touched.
  4. Under If, + Add condition ▸ Code is true, Code key_down("Space") and player_state() == "fall" (in the air and holding jump).
  5. Under Then, change the first action to Launch player (Which way Backward, Speed (tiles/s) 8), then + Add action ▸ Launch player again (Straight up, 12) and + Add action ▸ Play sound (jump).
  6. Try it: press ▶ Play, jump at the wall and hold Space as you hit it: you spring back off it, up and away. Two walls facing each other make a shaft to climb.

#Quick code

Where it goes: on the wall, Event: Player touches / steps on it.

if key_down("Space") and player_state() == "fall" then
  launch("back", 8)
  launch("up", 12)
  play("jump")
end