How do I get on screen controls to work correctly

Get help using Construct 2

Post » Thu Jan 07, 2016 12:01 pm

hi guys...For my game i need to have onscreen controls following this format one accelerator sprite on the bottom-right corner of the screen and two direction sprites(left and right) at the bottom left side.for now every thing is fine and seems to work but on testing on my phone...i cant have the accelerator down and still be able to move the car...i have to do one touch at a time...Why is that?
heres what i use:
touch:istouching leftCtrl go left
touch:istouching rightCtrl go right
touch:istouching accelerator accelerate


I build my game without webgl as it speeds up the wole gameplay on my test device
B
6
Posts: 28
Reputation: 308

Post » Thu Jan 07, 2016 12:13 pm

Usually this setup should work, if your actions are not conflicting..

You could try using TouchID..

From the Manual:

Multi-touch

The Touch object supports multi-touch. This is most useful with the On touched object and Is touching object conditions, which can for example detect if multiple on-screen touch controls are being used. This is sufficient for many games.

For more advanced uses, the TouchID, XForID and YForID expressions can be used to track individual touches for different purposes. Each touch has a unique ID (which is an arbitrary number), and can be accessed using the TouchID expression in an event like On any touch start. The touch ID can then be stored in a variable and tracked using the XForID and YForID expressions. Finally comparing the TouchID in On any touch end indicates when that touch has been released.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jan 07, 2016 1:40 pm

ill try with touchid and get back to you.
B
6
Posts: 28
Reputation: 308

Post » Fri Jan 08, 2016 12:56 am

@littleStain finally i went to use tapping to enable acceleration and deceleration(toggling) this enables me to control properly the vehicle...thank you for your time
B
6
Posts: 28
Reputation: 308


Return to How do I....?

Who is online

Users browsing this forum: celstrider, cgsammu, jobel, LukeW, omnipaws, Yahoo [Bot] and 10 guests