Touch 1 time = info, 2 times = do something

Get help using Construct 2

Post » Wed Sep 20, 2017 4:37 pm

Hey
First touch info about level and second touch run this level.
Any idea guys?
Thanks!


Image
B
10
S
4
G
2
Posts: 197
Reputation: 2,382

Post » Wed Sep 20, 2017 5:16 pm

Hey @marcinkowski!

touch 0 / touch 1 refer to simultaneous touching, thus, when two touches are detected simultaneously, touch 0 is the first one and touch 1 the second.

According to your description you want the first touch/tap to show info and the second to start a level. You could create an instance variable, showingInfo on the example below, to check for the first touch.

On Lv1Switch touched
if Lv1Switch.showingInfo = false [show info & set showingInfo to true]
Else [start the level]


Hope this help. Cheers!
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
3
Posts: 624
Reputation: 3,750

Post » Wed Sep 20, 2017 5:34 pm

brunopalermo wrote:Hey @marcinkowski!

On Lv1Switch touched
if Lv1Switch.showingInfo = false [show info & set showingInfo to true]
Else [start the level]
!

hmm something is wrong:
Image
@brunopalermo
B
10
S
4
G
2
Posts: 197
Reputation: 2,382

Post » Wed Sep 20, 2017 5:44 pm

Hey...

Here's a capx, using a slightly different (but better) solution...

https://www.dropbox.com/s/wk7gforq2t6fb ... .capx?dl=0

[EDIT] The problem on your code is that the condition "Info is false" should be a sub event of the touch event.

See ya!
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
3
Posts: 624
Reputation: 3,750

Post » Wed Sep 20, 2017 5:57 pm

brunopalermo wrote:Hey...

Here's a capx, using a slightly different (but better) solution...

https://www.dropbox.com/s/wk7gforq2t6fb ... .capx?dl=0

[EDIT] The problem on your code is that the condition "Info is false" should be a sub event of the touch event.

See ya!

damn... why people installing unstable versions???

ok, I'm checking this relase ;-
B
10
S
4
G
2
Posts: 197
Reputation: 2,382

Post » Wed Sep 20, 2017 6:12 pm

Don't be afraid of unstable versions, they don't bite... Seriously.

Also, you should consider being less of a dick to people who are actually trying to help you for free... (EDIT: Yeah... I've read the unedited answer...)

There you go:
Image

See ya.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
3
Posts: 624
Reputation: 3,750

Post » Wed Sep 20, 2017 6:59 pm

@brunopalermo


Thanksfor capx to that it was very helpful, a good job man. I have a bad experience with new versions of anything. I never bought a new Windows until I had to do it.
B
10
S
4
G
2
Posts: 197
Reputation: 2,382

Post » Wed Sep 20, 2017 7:05 pm

Glad to help!
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
3
Posts: 624
Reputation: 3,750


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests