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
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

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
80
S
30
G
12
Posts: 517
Reputation: 12,713


Return to How do I....?

Who is online

Users browsing this forum: Albatr and 42 guests