Detect Touch

Discussion and feedback on Construct 2

Post » Mon Nov 05, 2012 3:24 pm

Yes I know I can do that Ashley, but it's a lot of work and I am very lazy!

I am trying to see if I can make a duplicate of the TOUCH behaviour, and use this without mouse on the first screen only!!!!
B
43
S
11
G
4
Posts: 428
Reputation: 7,454

Post » Mon Nov 05, 2012 3:40 pm

Indeed my theory works!

I duplicated the Touch object, edited it a bit, and renamed it to TouchDetector.

i don't put a mouse to TouchDetector, and it fires as soon as i do a touch!

the rest of the game works with the standard Touch!!!

C2 is so great and flexible for diy additions!!!
B
43
S
11
G
4
Posts: 428
Reputation: 7,454

Post » Mon Nov 05, 2012 4:39 pm

Can't you just use the Mouse plugin in the same way? If 'on mouse click' fires then the user is using a mouse otherwise they're using touch.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Thu Aug 31, 2017 7:49 pm

Ashley in any browser, I w ant to detect if the device has touch support. In JS is " 'touchstart' in window " ... so how I can.... ?
B
7
S
3
G
1
Posts: 2
Reputation: 1,036

Post » Thu Aug 31, 2017 7:54 pm

When I add event using browser object I can´t see "Supports touch device", only has"Supports requesting fullscreen". Is possible to add "Supports touch device" ?
B
7
S
3
G
1
Posts: 2
Reputation: 1,036

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: AnimH01 and 10 guests