How do I Disable multitouch

Get help using Construct 2

Post » Mon Mar 10, 2014 11:23 am

I am making a game similar to Physics puzzle in Construct 2. Is there any way to prevent multitouch? So player can only destroy one block at a time
Banned User
B
32
S
6
G
5
Posts: 116
Reputation: 6,420

Post » Mon Mar 10, 2014 11:45 am

My method is use TouchCount expression of Touch object.
I put the condition System -> Compare two values -> "Touch.TouchCount=1" inside the touch event, that way the event only run when there's exactly one touch.

Well, i just wish there's an option to turn off multitouch, because not every games need this.
B
24
S
4
G
2
Posts: 41
Reputation: 1,543

Post » Mon Mar 10, 2014 11:49 am

i'm sure there is a way to do this. Try to work with touchID's every touch has his own ID. for a quick and dirty solution i would try to do something like this:
global variable "singleTouchID"
on touched "block" -> "singleTouchID" = touch.ID
if touch.ID = singleTouchID -> destroy block

now i dont know how fast construct reacts, but if your lucky the player will only destroy one of the blocks if he touches multiple ones the same time.

i think there is something like touch.count too .. if i remember correctly .. then u could do stuff like:
on any block touched -> if touch.count = 1 -> block - destroy

just have a look at the touch expressions and properties ..

cheers!

EDIT:
feyninja was faster .. :P i'd go with his solution.
B
23
S
6
G
5
Posts: 132
Reputation: 4,487

Post » Mon Mar 10, 2014 12:01 pm

@feyninja 's Solution worked perfectly
Banned User
B
32
S
6
G
5
Posts: 116
Reputation: 6,420


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 9 guests