[SOLVED] Problem with tactile touch on mobile devices


I’m trying to do mobile game but I have a problem. I can tell the game not to move the cursor when touching the screen. Except if the player touch the screen before the first scene of the game is displayed, so while the game is loading. So if the player touch somewhere during loading, then it’s as if there’s a non-stop pressure on that part of the screen. I’ve seen that the game can’t move the cursor, so is there a solution to my problem?

Thank you in advance for your answers

1 Like

I think the answer to your question is on this page

I have set move cursor when touching screen to “no”, but if the player touch the screen before the launch of the first scene, it will move the cursor during the loading

as long as the scene is not loaded, it should not accept player commands. Take a test and see how it behaves

What you’re asking it to do is not move the cursor before GDevelop has finished loading. GDevelop has no control over the cursor until it’s loaded. I suspect it’d require a change to the web page that gets loaded. If so, this may be something that’s better answered by the likes of @arthuro555 or @Silver-Streak.

Okay so I made a short game to test if it’s only work with my games but it doesn’t. You can download the file for the game here so you can try by yourself : https://drive.google.com/drive/folders/17minvKewkm1xEhYIzmr3B_VjgDkWG82n?usp=sharing
The code is really short to be sure of where is the problem.

When you touch a white square, it change to red, and when you realese it, it change back to white. So, if you launch the game to a mobile device, if you touch the screen during the loading, it will change the square that is located at the place of the touch to the red, without being able to go back to white. So it means that Gdevelop save the position of the cursor when he is loading, before the first scene have ended loading.

You can use "when cursor/ touch down " condition with your when "player clicks on button " condition and these should work

When you touch the screen, the cursor moves to where the touch occurred. This is done by the OS, not GDevelop. When you release the touch, the cursor does not move. It stays at the last touch position. It’s not that GDevelop remembers or saves the position.

Now, you are only testing if the cursor is over the object. Which will trigger as true every single frame while the cursor hasn’t moved. You should be testing "Mouse button pressed or touch held’.

Hello everybody

I fixed my problem with the multitouch, but i will report the problem anyway.

I have the same problem

Hi Tibs, How did you fix it using multi touch? I have the same problem

Please don’t resurrect an old post. Start a new one, or better still search GDevelop for previous posts that have solutions to your problem, like this very recent one.