Not working on mobile

Hello, does anyone know how make a clickable button on mobile device? Like in this example, I made a clickable castle, that if the player clicks it, it changed the scene to another scene that I made. Like inside the castle… And it works on Computer! But when it’s on mobile it doesn’t work! Please help, Thank you. (I’ll post on the comment what code I did)

What command should I use that works on mobile?

cursor/touch does work on mobile.
Maybe your problem is somewhere else?

I use this method, and it works both on smartphone, both on pc, and on the web

You can also use only the first 2 conditions, if you don’t need the button feedback :slight_smile:

bro I tried, It does work on pc. but on mobile it doesn’t work.

it’s very strange, it works for me … Can you make a screen of how he set it up?
What if you try to make the castle “pressable” instead of the button?

please help I really need this to work :((

Hello reginald, Did you try generating a new apk file from your project?

should it work … how do you test it? compile the apk and install it on smartphone? which smartphone do you use?

There is another way to make touch control: create a small sprite sensor that appears when you touch. All conditions are set through the collision of the sensor and the desired object.


This is much more complex, so if @reginald doesn’t succeed in using simple touch, I’m not sure it’s a good suggestion for him :slightly_smiling_face:

@reginald First, your color change event will never work, because as soon as the condition is valid, the game should switch scene.
Regarding the scene change, check that the name is correct, and maybe check that your onscreen buttons work.

May be :sweat_smile: . But if he copy the conditions, then it will work :slightly_smiling_face:

Wait, I just recompiled my game, and some keys go, some don’t … Which leads me to think about one thing, Gdevelop has updated, are we sure that some instructions have not changed?
(I’m having a problem with collision masks again … it never happened to me …)

1 Like

Maybe Mr Angel Maybe