So I’m making a 2d platformer and I have a few issues that I want to fix
- How do I make my player only go up and down? So how do I disable left and right movement when on ladder?
- Is there a way to adjust the climbing speed?
- Whenever you press up key and jump key at the same time, the character goes up the ladder very quickly. How do I stop this?
Can you explain and describe number 1 in more detail? I’m still having trouble with the code
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.
Alright, thanks for the help