#Multitouch for two virtual analogs

3 messages · Page 1 of 1 (latest)

late lintel
#

Hi guys, it's the first time I'm exporting a game to android in Gamemaker, and I would like to know how I can make 2 or more touches to be detected simultaneously. I made 2 analogs on the game screen, and I made a system using mouse functions (like mouse_check_pressed and etc). The problem is that to move the blue analog you have to release the red analog, and to use the red one you have to release the blue one, that's not what I wanted. I wanted all analogs to be able to be used at the same time on the screen.

I would like to know how I can solve this problem. In advance, thank you all.

unique torrent
#

you have to use the device mouse x and device mouse y functions

fickle crescentBOT
#

This function returns the x position of a touch on the device. If you are running this on a the HTML5 or PC and Mac modules then this value is updated constantly, as long as the device (usually a mouse) is plugged in, however for mobile devices, this will only be updated while the screen is being touched and note that the maximum number of touches that can be detected will depend very much on the device being used and the OS it runs.

Arguments
device: The device (from 0 - n) that is being checked.