double touch like double mouse click

Get help using Construct 2

Post » Tue Jun 05, 2012 5:43 pm

when i touch twice screen do something. for example when i touch twice sprite sprite set mirrored or flipped?
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Post » Tue Jun 05, 2012 5:46 pm

hmm i don't know there is different from touch twice and double click because touch twice with 2 finger is not supported as i remember but double click is normal so if you want it to flip just do like this :

mouse double click on object : ---> flip
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Tue Jun 05, 2012 5:57 pm

yeah but i want do this only with touch.
first event- when sprite is dragged (one finger) and other sprite is touched (by second finger) rotate sprite.

second event- when i double touch sprite -> flip spritedelgado2012-06-05 17:58:18
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Post » Tue Jun 05, 2012 6:39 pm

hmm as i told you construct2 doesn't support 2 fingers but support double click with mouse also if you want double touch its acceptable with some ticks for example :
you have 2 object (player [with boolean],pin) : events:
on start of layout ---> pin object pinned on player
-if you touch player [false] -->> pin destroy   and after (1-2)second create pin on player

if pin is not on screen ---> player boolean = true

if touched player [true] ---> flip player

so try this if it worked or not , if not upload the capx let us see what the problem i think this shouldn't have any problem ... if it has any problem i think it will be fixed because it isn't that much hard ( i think)
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Tue Jun 05, 2012 10:24 pm

Here, this may help:
http://www.scirra.com/tutorials/158/veryvariable-toggle-between-two-states
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
B
38
S
19
G
26
Posts: 438
Reputation: 16,581

Post » Tue Jun 05, 2012 10:51 pm

B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Jun 06, 2012 7:56 am

@ramones this looks promising. How to change in your example rotate clockwise to flip and unflip sprite?delgado2012-06-06 08:08:28
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Post » Wed Jun 06, 2012 10:58 am

I updated the capx.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Jun 06, 2012 7:10 pm

@ramones thank you
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Post » Thu Jul 05, 2012 12:17 am

@ramones Thank you!, That's what I was looking for.
B
21
S
5
G
5
Posts: 163
Reputation: 5,028

Next

Return to How do I....?

Who is online

Users browsing this forum: armaldio, plinkie and 18 guests