Ladder stuff ig

so uh I’m working on ladders rn and I was wondering how you make the player get off the ladder when they reach the bottom? and how do you make them go in the center of it

To make the play stay in the center you can do something like

Condition
Player is on ladder

Action
Change X Position of Player set to “Ladder.CenterX()”

To make them get off at the bottom, you can create an invisible object to use as a hit box, place it a the bottom of the ladder and then do something like

Condition
Player is in collision with “GetOffLadder”
“Down” key is pressed

Action
Simulate control “Get off ladder” (I forget what the actual control is called)

Theres other ways of going about it, but that should work fine :slight_smile:

when I do the “ladder.CenterX” it makes the player go to another ladder or it just messes up entirely

You need to specify the ladder by using the “player is in collision with ladder” condition.

To use @MagicBiscuit’s suggestion of using ladder.CenterX(), you should also change the origin of the player character to be in the middle of the sprite. Otherwise, the player character will get placed on the right side of the ladder.

1 Like

I completely forgot about this…

If your Ladder Sprite and your Player sprite have the same dimensions, for example, if their both 32x32, then you can simple change the players position to Ladder.X().

If they have different sizes, as in the Ladder is 32x32 but the Player is 48x48 or something along those lines, then you need to change the Origin Point of the Player to be at the Center of the Player, then you use the change position to Ladder.CenterX(), to neatly center the character.