Hi everyone,
I’m trying to find a simple way to disable jumping while on a ladder, as otherwise ladder speed has no effect since the player can jump and climb the ladder super fast.
The code I tried is
The effect is that the zombie can’t jump on the ladder like I wanted (but it can jump off the top??) however if I move the zombie next to the ladder, then move it away again, I can’t jump at all (no matter how far away it goes).
I looked at the previous solution posted where we disable default controls and simulate, but this has lots of code implications, especially for using animations for different actions.
I’m hoping that someone can explain WHY the behaviour is doing what it is doing, and maybe suggest a workaround that doesn’t involve disabling default controls.
Thanks but no dice! Still made no difference. Once the zombie gets to the ladder, it successfully sets the jump speed to 0, but it stays this way even when the zombie is not on the ladder, unless it lands more than 50 pixels away from the ladder. Exactly as in the video from the first post! I’m beginning to think there is a bug in the game system as it doesn’t seem to be re-checking the value of On Ladder/Not on Ladder correctly.
I’ve checked with a text label - the variable is changing and the on ladder / not on ladder is working, it is just not jumping!!!
This is much tidier than the previous solutions from another thread that required we disable default controls, a solution that has massive flow-on effects for my younger or less computer savvy students!