Maximum Jump Height

In my game I have a jump on release feature where my character will only jump when the spacebar is released. I want to make it so when the spacebar is pressed the jump height gradually becomes higher and caps at a certain point. I have had trouble getting it to work and I’m stuck.

From the sound of things, you want to start a timer when space bar is pressed (remember to use the trigger once while true when checking for key press), and then use the timer’s value to determine the jump height (using some calculation) when the space bar is released.

2 Likes

There is an attribute on the platformer behavior that controls this… I can’t find it on the wiki but it is essentially what you are looking for “hold to jump higher”.

Add a value to the Jump sustain in the Platformer behavior


Note: I think this only works if the platformer has default controls active.