I’m making a platformer and in the “platformer object” behavior, you can set a “jump sustain time” that allows for variable jump heights.
The issue is that there’s no way to give a minimum value, only a maximum. I feel like there’s not enough difference between simply pressing space and holding it down for a long time. At 0.4, the maximum achievable height is ideal but the minimum is too high. The range is too restricted.
I’d like to be able to set both a minimum value and a maximum value. I hope this makes sense.
I’m sure this can be done with a custom extension or behavior. My question is: how do I create that?
I don’t know if this can be achieved with an extension, considering that the platformer is a default behavior, but there’s an “Advanced jump” extension you can look at to seek inspiration.
Maybe you’ll need to build your own jump actions, but I’m not sure if it will cohabit well with the default platformer behavior.
I was having the same difficulty a few time ago and decided to try to solve after you have posted here on the forum.
The impression I had after doing some tests was that the jump sustain just adds strength to the jump. The minimum value is imposed by the values you have chosen in gravity, jump speed etc. So, I think it makes no sense to have a “minimum limit” in “jump sustain”, because the minimum value is your normal jump. The problem is that when putting a small jump with a high sustain jump to have a biggest difference that you and I wish does not work. The jump sustain seems to have a limit probably related to the jump values themselves. But like i said, that’s just my impression. I can be totally wrong (normaly I’m wrong )
Some updates ago Gdevelop received the implementation of the abort jump action. Using it for abort jump when the button is not pressed and a timer to make it works just for a little period is a way I found to make a small jump for my game. The point is, aborting the jump has an abrupt effect, but for small jumps, I didn’t think it got weird.
Thank you for taking the time to respond to my question! I see. I will try using the abort jump function then!