Touch and Click events problem

Get help using Construct 2

Post » Sun Aug 18, 2013 12:01 am

I have a switch button, it toggles a value on clicked or on touched.

The problem is in some browsers like in chrome, when I click the button it also triggers the touched event, so the value togles and togles back again to the initial state.

How can I workaround this problem, thank you.
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177

Post » Sun Aug 18, 2013 12:18 am

You only need clicked OR touched right? Was there a reason you were using both?
B
46
S
16
G
73
Posts: 2,084
Reputation: 43,677

Post » Sun Aug 18, 2013 12:23 am

the touch object also emulates mouse clicks, so just use onTouch for both.Lof2013-08-18 00:24:01
Image
B
74
S
28
G
12
Posts: 515
Reputation: 12,359


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests