You can turn off the default controls in the behaviour. Then add events with conditions that test for a particular keypress (e.g. space), and actions that simulate a keypress (e.g. jump key pressed).
So, test if the player is on a ladder when testing for the left and right keypresses
Adjust jump speed via the behaviour by editing the object properties window.
For the jump key, check if the player is not on the ladder (invert the is-on-ladder condition) and only simulate the jump key pressed if all conditions are met:
You know where you add the platformer character behaviour to your object? That’s where you uncheck the default controls option.
And to add the conditions, just use the example in my screen snip, but replace “Space” with the direction key, and replace the “simulate pressing jump key…” with "Simulate pressing " and the direction key
Oh sorry I should have been more specific. So when my character is on the ladder, I can move up, down, left, and right. But I don’t want to move left and right and only want it to go up and down. How do disable left and right movement on ladders?
No, I understood exactly what you’re after. And my little screen shot has the information on how to do it. The only difference is that in the screen shot, it only allows jumping when not on the ladder. You’ll need to modify the event in my screen shot to cater for the left and right key presses.
By unchecking the default controls option, and creating events to capture the keypresses. When pressing the left or right keys, check the character isn’t on the ladder before simulating the left and right key press. I’ve already shown how to do it for space bar and jumping.