How do I limit ONE touch on the screen to only ONE touch?

Get help using Construct 2

Post » Sun Mar 01, 2015 7:27 am

In my game, I have it so that when the person clicks a particular object (i.e. a van), they lose ONE gas can. However, I notice that no matter how careful I am when playing the game, when I touch the object (i.e. the van), the tablet almost always counts it as 2 or 3 touches... and so you lose gas too quickly.

Is there an easy way to limit one touch to only ONE touch? Unlike when a person clicks an objecting using a mouse, evidently when they touch the object with their finger (on a tablet), I'm encountering this problem.

Anybody have any simple solutions? Thanks in advance. :)
B
9
S
2
Posts: 111
Reputation: 1,010

Post » Sun Mar 01, 2015 7:58 am

you could use on Nth touch start and use 0 then it only will count first touch. or on tap/on hold. or in you need when the touch ends use on any/orNth touch end and is touching object in one event it works great
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Sun Mar 01, 2015 8:11 am

I am sorry. I am a little bit of a novice at this stuff. Could you perhaps show me a very short example of how you would implement those commands to solve my issue

I pretty much understand what you are sayin saying But I cannot seem to get it to work correctly. I have a hunch once I see a short example, that will save me a ton of confusion

Thank you greatly in advance.

I am attaching a screenshot of what I THINK you mean. Will this work?

PS: I also saw this on the forum... but I'm confused/not sure what the difference is between my example and their example (i.e. What is the difference between "On touch 0 start" vs. "On touch 0 end" ?


On touch 0 start
Is touching <object>
You do not have the required permissions to view the files attached to this post.
B
9
S
2
Posts: 111
Reputation: 1,010

Post » Sun Mar 01, 2015 4:59 pm

Your idea worked. It worked! :)

I used:

On touch 0 end
Is touching <object>

I still have NO idea what the difference is between "On touch 0 start" vs. "On touch 0 end" --- but your comments/help really put me on the right track. Thanks VERY much for letting me know. :)
B
9
S
2
Posts: 111
Reputation: 1,010

Post » Sun Mar 01, 2015 7:43 pm

ohhh,,,,, again overcomplicated with touch end ,..... use this formula.... on touched object add a new subevent system>triggeronce while true then move ur substract 1 gas to that line
and then u dont need to brainstorm about the nt0 touch start and end that is for something entirely else


here is a quick capx for u i just did now
You do not have the required permissions to view the files attached to this post.
B
75
S
22
G
68
Posts: 1,337
Reputation: 43,271


Return to How do I....?

Who is online

Users browsing this forum: AndreasR, David181, karthikavnair and 9 guests