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
- 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.
- Switch to Advanced. With it picked, click + Add behavior ▸ Logic ▸ Trigger.
- Set When to Touched.
- Under If, + Add condition ▸ Code is true, Code
key_down("Space") and player_state() == "fall"(in the air and holding jump). - 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). - 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
Get an email when Voxel Game Maker launches
It's coming to Steam with a launch discount. One email on launch day, the odd progress update, nothing else.