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
107
S
25
G
43
Posts: 1,882
Reputation: 33,501

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
52
S
15
G
7
Posts: 795
Reputation: 12,770

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
107
S
25
G
43
Posts: 1,882
Reputation: 33,501

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
52
S
15
G
7
Posts: 795
Reputation: 12,770

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:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
46
S
24
G
30
Posts: 513
Reputation: 19,431

Post » Tue Jun 05, 2012 10:51 pm

B
55
S
29
G
19
Posts: 1,520
Reputation: 25,620

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
107
S
25
G
43
Posts: 1,882
Reputation: 33,501

Post » Wed Jun 06, 2012 10:58 am

I updated the capx.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,620

Post » Wed Jun 06, 2012 7:10 pm

@ramones thank you
B
107
S
25
G
43
Posts: 1,882
Reputation: 33,501

Post » Thu Jul 05, 2012 12:17 am

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

Next

Return to How do I....?

Who is online

Users browsing this forum: jance0405, mandy1, sandeeph and 3 guests