[Solved] How do I prevent multi clicks from interrupting each other

I am making a 2D platformer game and have ran into an issue. I was adding in mobile support, and while playtesting I ran into an issue. Whenever I click jump while holding left, my left input just stops until jump is released which is a big issue since you need to hold jump whilst moving in this game. Any help would be appreciated.


It is arrow sprites as the buttons.

Hi the way that it’s set up is quite strange
Id have it
At the beginning of the scene
If device has touch screen set the variable to yes
Then as new event
If variable is yes
Sub event …touch on object and left mouse button down …simulate controls
For each control …that should work. You don’t need ‘and’ there …only really need those when using an ‘or’

i just tested these events seems to work …but i usually use the multitouch joystick

Thank you for your reply, this is my first game on GDevelop and I am still figuring out how to use the program to its fullest. I will try what you recommended, I have it set up that way-excluding the and statements-is for bug testing because I was not on a touch device when coding this.

Thank you, I will try this code.

thats the problem i have testing touch - i have to actually send it to gd.games and then open it on my phone.

if you’ve got ladders involved its easier to just use the multi touch joystick

I have a touchscreen laptop that I mainly code this on, so that will not be an issue.

1 Like

I have tried the multi touch joystick but due to the game design it does not function in the way I intend it to. My games setup is close in design to the game ovo, talking in the sense of controls and 2D setup.

But thank you for your input I will apply that to my code and see if it works.

I have applied your code and it has fixed my issue, but it has caused another issue where when I release the jump it forces the left and right movement keys to stop.

I understand that you have other stuff to do than help me. So feel free to get back to me when you have the time.

I didn’t notice it do that when i tried it out - ive just deleted it …ill do some research

actually im being a muppet here…you need to get rid touch held left mouse button down …sorry! …doh!
just need touch on

This worked great, but my character continues moving after being released. I will try and debug this on my own but your input will be greatly appreciated.

How high is the deceleration in the platform character behaviour?

It is currently at 3500 with 800 acceleration.

But the issue is it keeps moving as if I was holding it down. But I was just tapping them.

Currently you are using one input (the mouse pointer moved by a finger touch). It sounds like you need to use multi touch. It’ll require a bit more work, but it’ll allow for a direction button to be held while the jump button is pressed.

Here’s an entry in the GDevelop wiki on multi touch.

And here’s a link to an example project that uses multi touch.

1 Like

Because the mouse is moved by your finger. When you stop touching the screen, the mouse is still on the screen and stays put on the button until the next touch is made.

2 Likes