Jump on Release

I’m trying to create a jump on release system where the character only jumps when the space bar is released. I’ve tried to use gravity and the de/activate behavior, but the animation either spasm’s out or it floats. I tried looking for help on the forums but no one has had a similar problem to this.

Couldn’t you just use the “when key is released” condition and then simulate a jump key press if you are using the platformer behavior?

I don’t know how, I’m new to GDevelop and coding in general.

You want to give the character the “platformer character” behavior by hitting the 3 dots next to the character in the object editor. Then in the events tab add a condition and search the “key released” condition, select it, and select space from the dropdown menu. Then after the condition add an action, select the character, and select the “Simulate jump key press” action.

I would recommend this tutorial if you are new to gdevelop and are interested in making a platformer, it should teach you most of the basics and help you get started, it’s what I used when I was new: Platformer Tutorial, Part 2: Create a Playable Character [GDevelop wiki]

You might also need to disable/uncheck “default controls”, otherwise hitting the space bar will still cause the character to jump. If you do this, you’ll also need to manually add back other default controls (such as moving left and right).

I’ve done that but now my animations have been disabled. Do you know how to fix this? Nevermind I found out it was because of the ‘On Floor’ command.

Thank you! I will make sure to take a look through it.

1 Like