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

0 favourites
  • 5 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • 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.

  • 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

  • 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>

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)