Hello i am new to studio
I was wondering how to use touch screen to move char left and right and double tap to shoot
I cant find touch screen option in game maker
Also is it possible to make your own virtual keys for android games?
Touch screen
Started by witcher, May 01 2012 02:49 PM
4 replies to this topic
#1
Posted 01 May 2012 - 02:49 PM
#2
Posted 01 May 2012 - 04:00 PM
from what i have read you do these by mouse events and virtual buttons(name is incorrect) that are placed in areas on the screen. so for single touch games i think you can use the standard mouse position and press events. but for more functionality you use the built in studio functions which you can find in the help files.
im not currently on a machine with it installed so i cant list them but i know they arent hard to find
im not currently on a machine with it installed so i cant list them but i know they arent hard to find
#3
Posted 05 May 2012 - 08:18 AM
I cant find any mouse events tha lets you move left and right
Suppose like in space invaders type game how can you move left and right with your mouse
Suppose like in space invaders type game how can you move left and right with your mouse
#4
Posted 05 May 2012 - 08:28 AM
YoYo_AddVirtualKey( X position, Y position, Width, Height, Keycode)
YoYo_ShowVirtualKey()
Those are the 2 functions you use for it
Like this
zz = YoYo_AddVirtualKey(60,320,128,128,ord('Z'));
YoYo_ShowVirtualKey(zz);
For virtual keys to move
Use YoYo_Mouse for mouse like input. You can use normal mouse events too but then you wont have multitouch
YoYo_ShowVirtualKey()
Those are the 2 functions you use for it
Like this
zz = YoYo_AddVirtualKey(60,320,128,128,ord('Z'));
YoYo_ShowVirtualKey(zz);
For virtual keys to move
Use YoYo_Mouse for mouse like input. You can use normal mouse events too but then you wont have multitouch
#5
Posted 06 May 2012 - 04:46 AM
your fingers should emulate the mouse so get this code in the left mouse event:
x=mouse_x
if you want to do height wise coordinates do thusly so in the code below:
y=mouse_y
x=mouse_x
if you want to do height wise coordinates do thusly so in the code below:
y=mouse_y
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











