Manual: Grabbing walls and wall kick jumps

About this manual

This manual explains how to build a character that grabs onto walls. Three pieces work together.

Piece What it does
The condition “Touched a Wall” (ContactWithWall) Tells you whether there is a grabbable wall beside the object
The action “Grab Wall” (GrabWall) Drives the object while it holds on: gravity is stopped, it follows the wall, it slides down and climbs
The coordinate space “Opposite Of The Grabbed Wall” in “Set Object Velocity” (SetObjectVelocity) Gives the object the velocity that kicks it off the wall

Wall slides, wall kicks and hanging from a ledge can all be built in the player’s visual script. Because the object stops gravity and holds on to a wall on its left or right, this is mainly a side view feature.

How wall grabbing works in ACTION GAME MAKER

You decide which wall is grabbed and when; the action decides how the object moves while it holds on. Grabbing, letting go and kicking off are wired as transitions in the visual script.

While the object holds on, it follows the wall it grabbed. A moving wall — a course platform placed vertically, for example — carries the object with it instead of letting it slide off. A tile wall that never moves works exactly the same way.

How to use it

The smallest setup is four steps.

  1. Add a “wall grab” state to the player’s visual script.
  2. Put the condition “Touched a Wall” on the transition from the normal state into it.
  3. Put the action “Grab Wall” into the “wall grab” state.
  4. Wire the transitions that let go or jump (the grab is released as soon as the action is gone).

“Touched a Wall” (ContactWithWall)

A condition. It holds while there is a wall on the side you chose. The wall is looked for exactly the way the “Grab Wall” action looks for it, so the wall that makes this condition hold is the wall that gets grabbed.

Wall Collision

  • Wall Contact Directions: the sides to look at (Left / Right). Both are on by default. The condition holds when a wall is found on either side.
  • Detect Distance: how far past the object’s own wall collision the wall is looked for, in pixels.

Wall Target

  • Tile Group: choose “All”, “Not Targeted”, or one of the groups defined in the tile settings.
  • Target Object Group: choose “All”, “Not Targeted”, or one of the project’s object groups.

See “Choosing which walls can be grabbed” below.

Wall Corner

  • Corner Only: when on, the condition holds only at a corner, that is where the wall ends. This is the entry point for a ledge grab.
  • Corner Search Height: how far above the object’s center the top of the wall is looked for, in pixels. A wall that keeps going above that height does not count as a corner.

“Grab Wall” (GrabWall)

An action. While it is active, the object is holding on to a wall.

What happens while holding on

  • Gravity stops. The vertical velocity is cancelled too, so a slide speed of 0 keeps the object where it is.
  • Left and right input does nothing. The position follows the wall that was grabbed.
  • The object snaps to the wall surface the moment it grabs. If the wall collision and the image do not line up, shift it with the sideways offset.
  • Transitioning to another state removes the action and releases the grab automatically. There is no action to place for releasing.
  • Splitting the grab and the climb into two states does not break the grab. To play a different animation while holding still and while climbing, put “Grab Wall” in both states.

Grab Position

  • Grab Direction: which side to grab.
Choice What it does
Auto (Nearest Wall) Looks at both sides and grabs the nearer wall (default)
Display Direction Grabs only the wall on the side the object faces
Left / Right Grabs only the wall on that side
  • Detect Distance: how far past the object’s own wall collision the wall is looked for, in pixels. A larger value keeps the grab alive across small gaps in the wall.
  • Grab Offset: how far sideways the grab position sits from the wall surface, in pixels. A positive value moves the object away from the wall. Use it when the wall collision and the image do not line up.
  • Grab Face Direction: “Face The Wall” (default), “Face Away From The Wall” or “Keep Current”. The object keeps this facing the whole time it holds on, so the movement that pulls it to the grab position cannot flip it.

Grab Target

  • Tile Group / Target Object Group: narrow down which walls can be grabbed. Both are “All” by default.

Grab Corner

  • Corner Only: when on, the object grabs only at a corner, that is where the wall ends.
  • Corner Search Height: how far above the object’s center the top of the wall is looked for, in pixels.
  • Corner Offset Y: how far from the corner the object hangs, in pixels (positive puts it below the corner). The position is taken from the corner, so the object ends up in the same place every time, wherever it touched the ledge.

Grab Move

  • Slip Type: how the object slides down.
Choice What it does
Constant Speed Slides at “Slip Speed” (default)
Accelerate Starts at “Slip Speed” and picks up speed the longer it slides
  • Slip Speed: how fast the object slides down while holding on, in pixels per second. Set it to 0 to hold the grab position. With “Accelerate” it is the speed the slide starts from.
  • Slip Acceleration: how much the sliding speed picks up each second, used by “Accelerate”.
  • Slip Max Speed: the limit for “Accelerate”. 0 means no limit.
  • Wall Climb Speed: how fast up/down input climbs the wall, in pixels per second. 0 means up/down input does not move the object. The inputs used are the up/down inputs assigned to that object’s movement.

Option

  • Release When Lost (on by default): releases the grab automatically once the wall is no longer found, at the end of a moving platform for example.
  • Stay on Wall (off by default): sliding and climbing stop at the ends of the wall instead of carrying the object past them.
  • Stay Offset Top / Stay Offset Bottom: where the wall is checked for “Stay on Wall”, as a distance above and below the object’s center, in pixels. Once the wall is gone at that height, the object cannot go further that way.
  • Takeover Velocity (on by default): carries over the velocity of the wall that was held when the grab is released, the same way as leaving a moving platform. Turn it off to drop straight down.

Choosing which walls can be grabbed

To build “this wall can be grabbed, that one cannot”, give the wall a group.

Kind of wall Where the group is set
Tile wall “Tile Group” in the tile settings
Course Platform / Pass-Through Platform “Belonging Group Bit” on the node

Then set “Tile Group” and “Target Object Group” in the condition and the action. Tiles and objects are chosen separately.

Tile Group Target Object Group Walls that can be grabbed
All All Every wall (default)
All A group Every tile plus the objects in that group
Not Targeted A group Only the objects in that group
A group Not Targeted Only the tiles in that group
Not Targeted Not Targeted Nothing at all

Give the condition and the action the same settings. Narrowing only one of them leaves you with “the condition holds but nothing gets grabbed”.

Wall kick jumps

To kick off the wall, put “Set Object Velocity” into the jump state and set its Coordinate Space to “Opposite Of The Grabbed Wall”.

  • Positive X always points away from the wall, so the same values work on a wall to the left and on a wall to the right. You do not need a separate state per side.
  • Y stays in world space (negative is up).
  • To fly up at 45 degrees: X Operation = Set, X = 300, Y Operation = Set, Y = -300.

Do not use the “Jump” checkbox on the action node. A jump only goes straight up, which is not what a wall kick needs. Giving the velocity is enough — gravity still applies and the object follows an arc.

The wall used as the reference is remembered until the object lands, so the action belongs in the jump state rather than in the grab state.

An object whose facing is set to “movement direction” turns to face the way it flies. Even when the player is still pushing into the wall, it faces the direction it is actually flying.

Building the visual script

The smallest setup (3 states)

  1. The normal state (standing, walking, falling)
  2. The wall grab state (holds “Grab Wall”)
  3. The wall kick state (holds “Set Object Velocity”)

Example transitions:

  • Normal → Wall grab: “Touched a Wall” (combine it with a falling condition to only allow it in mid-air)
  • Wall grab → Wall kick: the jump button
  • Wall grab → Normal: “Touched a Wall” reversed (the wall is gone), or landing
  • Wall kick → Normal: after a set time, or landing

Splitting the grab and the climb

To change animation between holding still and climbing, use two states.

  • “Hold” state: “Grab Wall” with Wall Climb Speed = 0
  • “Climb” state: “Grab Wall” with Wall Climb Speed = 100, for example
  • Transition into “Climb” on up/down input and back when the input stops.

The grab survives the transition. The two states can carry different settings, the slide type for instance.

Ledge grabs

  1. Put “Touched a Wall” on the transition into the “ledge” state and turn on Corner Only. Start with a Corner Search Height a little larger than half the character’s height.
  2. Put “Grab Wall” into the same state and turn on Corner Only there as well.
  3. Use Corner Offset Y to decide how far below the corner the character hangs.
  4. Set Slip Speed and Wall Climb Speed to 0 so the character stays put.
  5. Climbing up, dropping and jumping off are transitions to other states.

Examples

Wall slide and wall kick

  • In the wall grab state, set Slip Type to “Accelerate”, Slip Speed to 20, Slip Acceleration to 200 and Slip Max Speed to 150. The character sticks to the wall and then slides down faster and faster.
  • On the jump button, transition to the wall kick state and use “Set Object Velocity” (Opposite Of The Grabbed Wall, X = 250, Y = -350).

Riding a wall that moves up and down

  • Place a course platform vertically and set its Pass Type to “Normal Wall”.
  • Set Slip Speed to 0 in the wall grab state and the character is carried by the platform’s movement.
  • Turn Release When Lost on to drop off at the end of the platform, or turn it off and turn on Stay on Wall to stop at the end.

Hanging from a ledge and climbing up

  • Hang in the “ledge” state (Corner Only on, Corner Offset Y 24 for example).
  • On up input, transition to a “climb up” state and build the climb there with a position move and an animation.
  • Down input or the jump button returns to the normal state, which reads as letting go.

Limiting which walls can be grabbed

  • Give the grabbable tiles a tile group (for example “Grabbable Wall”) in the tile settings.
  • Set Tile Group to that group and Target Object Group to “Not Targeted” in both “Touched a Wall” and “Grab Wall”.
  • Now no other wall can be grabbed.

Things to watch out for

  • A course platform whose “Pass Type” is still “One Way” does not act as a wall on its vertical faces. One way means the platform can be passed from below, so it is passed from the side as well. Set it to “Normal Wall” when you place it vertically as a wall. The condition’s ray ignores one way collision, so you end up with “the condition holds but the body does not stop”.
  • “Grab Face Direction” does nothing while the state has “do not change display direction” checked. The state’s own setting wins.
  • Give “Touched a Wall” and “Grab Wall” the same group settings. Narrowing only one leaves the condition holding while nothing gets grabbed.
  • A corner means “there is a wall here and no wall above it up to the height you set”. Once the object has grabbed, only the presence of the wall is checked, because hanging puts the corner above the point that is checked.
  • The grab takes priority over movement templates. A movement template cannot move the object while it holds on.
  • A wall is not recorded as a foothold. “Return to the last foothold” in Quick Restart does not return to a wall.
  • “Grab Wall” cannot be used in a sublayer. It takes over movement, so it is skipped there.
  • The carried-over wall velocity does not apply to an axis you wrote with “Set Object Velocity”. Kicking with “Set” gives you exactly the velocity you entered. Use “Add” when you want the platform’s momentum on top.
  • The grab offset is added to the detect distance automatically. Holding on at a distance from the wall never makes the object lose the wall.