Hello folks from GDevelop, I found out recently a bug involving the new “Jump sustain height” added a good time ago in the program that allow the players in a platform game to jump on different heights based on how long they pressed the jump button.
As I was trying to apply it in my game, and getting puzzled about why it wasn’t working, I found the feature doesn’t work with custom controls. If using the default controls (Space for jumping), it works, but if using custom controls (Simulating the jump key), it simply doesn’t work and the character jumps on only one speed height regardless of how much the player keeps the button pressed. It happens with both the keyboard and with any gamepad.
And that’s pretty much it, thank you for your attention. Even though this feature still needs some polishing, I feel confident it will become a good addition to Gdevelop in the future.
That’s very weird, then. I tried to recreate the problem here, and it happened again. I really don’t understand what’s happening, and why it works fine for you, Gruk, but not for me.
At least I was able to come with an alternative to implement some jump sustain height myself, but I really can’t help but find it odd how the in-built jump sustain height from the Platform Character Behavior works for you but not for me.
I’m really sorry for this, and thank you for your help in any case, Gruk.
I think that must be the problem. At first I thought it was something with the custom controls (namely, the keyboard text expression, used to allow the players to set their own keyboard configuration), or the gamepad, or even the AND expression (“If one of these conditions are true”).
But after reading your comments, I found out the problem you’ve described was the cause. You see, in the game I’m working in, you can jump when a variable called “jump_buffer” is set to 0. When you press the jump button, the value is set to 1 and it will continue like it until the player releases the button. I did this to avoid having the player keep hopping and jumping while keeping the jump button down (you fall, and if you keep the jump button pressed, you jump again, which is annoying).
Thank you for your help, guys, even though I can’t use the built-in jump sustain height, I really wish to thank you for helping me to understand what was happening. Thank you everyone!