How to STOP Auto-Jump by holding JUMP button?

When you try something you replicate it and don’t add your stuff and wonder why it is not working
Which 99% of the time is reason why it is not working

Delete Is on floor

I wasn’t sure how much other events to send since I have a pretty long list of events. I apologize I am new here. The issue doesn’t seem to happen too much so I guess I will just forget it.

So i just told you best practice since we all were in same boat

Copy EXACTLY what you see
Do not add your stuff until you check if it is working
And double even triple check did you copied it 1 to 1
You have no idea how many times many of us did not get something right just because we messed up event order or added ONE SINGLE action/condition here or there

You need to make some mistakes to learn what not to do

And since only difference from your events to mine is that you used is on floor
Then removing it should fix it

If problem still occurs then you should try disabling other events one by one and check which is causing it

Hello Nerdycoder!
First of all welcome! If you’re new to the forums or Gdevelop in general don’t worry about it. Learning all of this stuff is hard at first and some people forget that. I was able to come up with a fix for this that doesn’t involve coyote time or any of the other extensions meant to deal with jumps. Try this out and let me know if it works for you. Happy developing!

Thanks! this worked great!

1 Like

Do you have any hidden conditions in your Gamepad Event Group? or are the only things listed in this Logitech sub event

Hello i am extremely interested in this. Did you ever share it with anyone? Can I at least have your code so i can modify the gamepad mapper behavior?

This is all i have

Nothing more nothing less
If you care what is in sub event of each even you see here then

And this is what i have regarding my autojump

Okay I’ll take a look at trying to modify my code today. So do you have the gamepads extension in your project? If so, what would be the purpose of simulating controls for each direction on the keyboard? I think i get your logic, it seems you’re isolating the jump function to only be remapped when there’s a specific condition.

Hello, i was able to successfully implement this code in my project, but it only works with the Keyboard. Also about every 4th or 5th time i try to jump, my inputs get eaten.

Would this have to do with my jump height, gravity etc? I have a relatively low jump height and tight controls. I did some minor adjustments (since I don’t want to change the feel of my game too much) and it did prevent the inputs from being eaten so quickly. Perhaps there’s a way i can optimize this code? I have it in its own external event group. Maybe if I optimize the level more it would help?

I use this in games with keyboard, gamepad, and even touch input.

Jump speed and height shouldn’t matter as all of the uses I have done this in have different settings around that.

Keep in mind the example above includes a SUPER LONG coyote time. 1 second was just for testing. Most games only have 4-6 frames, which would be 0.08333 seconds.

That shouldn’t make it intermittent though, unfortunately intermittant response would mean something is going on with your event logic or setup in some way.

Edit: also note, your gamepad setup should be completely separate from your actual game logic events. You should have either an external event loaded at the start of the scene, or a function extension that has your gamepad buttons/inputs using the simulate actions from the platformer behavior.


I tried to implement your code, but I can’t seem to find where I am going wrong. So i found out this isn’t even possible to code without the gamepad extension, you won’t get these events. But then there’s that GamepadMapperBehavior that I had attached to the player sprite. I tried playing my game with this code, with and without that MapperBehavior. But it always produces the same results. I really want the modified extension that Marraw created back in 2023.

I even tried isolating this code and reproducing it but only with the control pad input in place of the regular keyboard inputs. But it just gives me the same results. I hate having to comb through my code, but I guess I’m going to have to. I’m also going to continue creating a new project file and add controller logic in there too, to see if i can get good results.

Yeah now I have my own external events list for gamepad logic, and I’m going to try to move all controls under there. But now I’m wondering if perhaps my “Jump again” thing that i have going on when you kill enemies could be causing a problem. Because that would all be under the enemy behavior. I’m gonna be spending a ton of time on this.

None of your events shown match my events, so I can’t help you there.

Also, there is no real benefit to using a button remapper extension in your game logic, it is both limited to select buttons only and really should only be used once at the start of scene or when buttons are remapped by the player.

Here’s the events that match yours exactly. I was trying to replicate ZeroX4’s code for the controller to see if that would work. And actually. Disabled all of my other external events in a level to see if something could be mucking things up with my other code, but he’s still bouncing around like a rabbit if I use the controller. Keyboard works great!

It is very old
I do not remember exactly why but i can deduce it

And by my logic i did it so all controls use same exact crap
Not like move player when something is pressed for example
W key is pressed should automatically move player with behavior

BUT so that whatever i press touch control keyboard key or gamepad button it all do exact same thing

YET i do not remember and can’t deduce why i went with such approach
It was my 1st time doing it
And only thing that did matter to me was it was working

Ow i think i know

When you use behavior for WASD or arrows
It works little bit different for if you simulate movement

I remember there was LITTLE issue with animations
And some other stuff
Not anything major
I would just need to do separate events for touch/gamepad controls
And separate for keyboard controls
And to avoid that and streamline everything i went with simulate movement

This is how I stop a character from auto jumping when using a gamepad.

Hello everyone. I just wanted to share an update since I finally fixed the problem. I’ve been working on this off and on for two years now so I litereally screamed out loud when it worked! So in order for Silver Streak’s method to work, there were a few things I had to do:

  • Remove GamepadMapperBehavior from my “Player” Sprite
  • Ensure the Gamepad Extension is installed in your project
  • Remove Remap Controls Behavior from my “Player” Sprite
  • Create Two unique Object Variables for “Player” (Gamepad & Keyboard)
  • Separate my Keyboard Controls into Unique External Events
  • Separate my Gamepad Controls into Unique External Events
  • Disable Default Controls for the Platform Behavior
  • Simulate Controls for Keyboard in the external events with Specific Events
  • Simulate Controls for Gamepad in the external events with Specific Events
  • Ensure the Player sprite has the Advanced Platform Behavior Attached (for coyote time to still work)

All of the Jumping is Controlled by this specific event ONLY. If you map any jump controls with events outside this behavior it will not work.

I wanted to say thank you EVERYONE for your patience with this matter. You have been extremely helpful and this will increase the quality of my game by 100%

I’m glad you got it working for you, for context, there’s some things above that aren’t required. Not saying you have to change it, just wanting to clarify.

These should be global variables unless you’re wanting to re-map them every scene (and, in a perfect world, should be in a function extension condition so you can just have “Action 1 pressed” and it accepts Keyboard and Gamepad and Touch, if you have them set up)

This is absolutely not required, they can be in the same external event.

Yes, this is absolutely required.

Again, these shouldn’t have to be separate events.

This also isn’t needed for coyote time.

As a rough example, here’s everything in one event sheet, with the keyboard and gamepad in the same events: https://game-previews.gdevelop.io/1728597470793-687443/index.html

and with a condition focused function extension set up.

https://game-previews.gdevelop.io/1728598218610-238953/index.html

This is all the extension is:

1 Like