Paper 2d: Trigger Double Jump W/O Using Is Falling?

Hi all,

I was watching the tutorial on how to do a double-jump and saw it involved putting the function, IsFalling, on Can Jump Internal. Unfortunately, I’ve found this results in the player being able to jump while they fall off a platform.

The result that I want is that the player can only perform a jump under normal circumstances, or if they’ve already done a single jump. I’ve set up the logic so that when the jump goes through, it increments an INT, Jump Interval. Below you’ll see a picture of how Can Jump Internal works.

The problem I’m encountering is that while the function, Can Jump is returning TRUE when the Jump Interval is 1 and the player has already jumped, the actual function of “Jump” is not doing anything.

Am I doing something wrong, or misunderstanding how Can Jump Internal works?

I had the same issues, and here is my solution. I have also added in something else that might be useful to you

In the image below, this sets the jump to be a kind of analog control, so when you press jump for a split second, the player only jumps a small amount. The more you hold jump, the higher his jump arc. Similar to mario or castlevania SOTN (as opposed to the original castlevanias where all jumps were exactly the same height)

then, I set a jump velocity on updateanimation, which I will use to check later if my character is actually rising during a jump, or falling (so I can switch paper2d sprites for a jump cycle)

lastly, this is my logic for jump and double jump. Since I have that Jump Max Hold Time in my construction script, with that alone… the player could double jump and infinite number of times. So, my logic was to to branch out a regular jump (which I allow), and then allow another jump, but only once until he hits the ground again.

hope this helps.

If you want to check the ledge thing, there is an Event called Event On Walking Off Ledge. Just have that fire into a bool called something like “Walked off ledge” and have a branch before the jump or double jump that checks that

And then if you want to wall jump you just do this…

1 Like