Not working on mobile


#1

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)


#2


#3

What command should I use that works on mobile?


#4

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


#5

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:


#6

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


#7

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?


#8


#9

please help I really need this to work :((


#10

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


#11

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


#12

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.


#13

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.


#14

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


#15

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 …)


#16

Maybe Mr Angel Maybe