-5

I am having trouble using the tap event, I made the space shooter with a different theme and I want to turn it into mobile, but when I hold down the object I created for the tap event, the image angle changes only once, I want it to continue continuously when I hold it down, can you help?

Here is the code I wrote inside the tap event:

with (obj_tuna)
{
    image_angle -= 5;
}
Steven
  • 1,996
  • 3
  • 22
  • 33
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Feb 13 '22 at 00:20

1 Answers1

0

A tap is a quick touch where you press and release quickly (just like a mouseclick), so it only recognises your action as a quick press, rather than holding down.

I'm not familiar with mobile platforms, but I notice with a quick search that mouse functions also work with touch functions. So perhaps, if you replace your tap event with a mouse event (or replace a Tap Event with a mouse function in the Step Event), then it may work.

Source: https://forum.yoyogames.com/index.php?threads/how-to-detect-when-a-player-holds-down-on-the-screen.63997/post-383553

Steven
  • 1,996
  • 3
  • 22
  • 33
  • thanks its worked but know I have another problem if I click left mouse button every objects code is working because of that nothing happens – Deniz Özbek Feb 02 '22 at 12:21
  • I'm assuming that every object on screen is doing the same thing, You're likely using a mouse click that happens anywhere on screen now, and maybe you only want a mouse click on a specific object, or that it turns towards a specific part where the mouse is. The solution depends on what you want to archieve. but you might want to use `mouse_x` or `mouse_y` for this. (Or look up GMS2 Mouse Position) – Steven Feb 02 '22 at 15:31