Double tap and tap events on the sprite

0 favourites
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • >

    > > lamar using those triggers: make a sprite destroy itself on a single tap, but flash on a double tap

    > >

    >

    > Now think real hard....

    >

    > If you destroy the sprite you double tap you sure as hell can't tap it again to make it flash.

    >

    > Just like I asked why you would double tap a sprite already set to double tap?

    >

    > Nice try but fail!

    >

    > Try this:

    >

    > https://www.dropbox.com/s/c1hxdpaell02t7s/Tap%20Example2.capx?dl=0

    >

    Lamar, row number 2 " double tap on sprite4" will NEVER run. If you delete that row nothing will changes

    Well I gave you the CAPX and it obviously works and I am in no mood to argue.

    I gave you TWO ways to do the same thing depending on what you want that sprite to do. Double tap and tap have specific purposes depending on events used. Take your pick and have a good day!

  • Please keep posts civil.

    lamar

    Never use the term 'fail' on a user, especially one requesting help. Not pleasant or polite.

  • Please keep posts civil.

    lamar

    Never use the term 'fail' on a user, especially one requesting help. Not pleasant or polite.

    OK I edited it but to be clear that response was to Gameglaux not the OP that was looking for help and Gameglaux used a false scenario that would only confuse the OP more.

    I was trying to explain the different uses of tap and double tap when Gameglaux decided to jump in and argue with a false scenario.

    Sorry if I was too rough on ya Gameglaux!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • well, that was an entertaining thread

    AndyRevenko

    Thought I would add another example...

    Like gameglaux said (maybe a little poorly), if you don't want the single tap code to execute, you have to add a delay and wait to see if there is going to be a double-tap. After a short delay, if there has not been a double tap, then you can execute the single tap code. The single tap event will always fire, so you have to come up with a method of waiting. The double tap event does fire if there are two quick taps on the sprite.

    I took up gameglaux's challenge and make a capx where you single tap to destroy a sprite, or double tap to make it flash. It took 4 events (plus two to spawn a new sprite to try again).

    http://www.rieperts.com/games/forum/TapDoubleTap.capx

  • well, that was an entertaining thread

    AndyRevenko

    Thought I would add another example...

    Like gameglaux said (maybe a little poorly), if you don't want the single tap code to execute, you have to add a delay and wait to see if there is going to be a double-tap. After a short delay, if there has not been a double tap, then you can execute the single tap code. The single tap event will always fire, so you have to come up with a method of waiting. The double tap event does fire if there are two quick taps on the sprite.

    I took up gameglaux's challenge and make a capx where you single tap to destroy a sprite, or double tap to make it flash. It took 4 events (plus two to spawn a new sprite to try again).

    http://www.rieperts.com/games/forum/TapDoubleTap.capx

    THanks a lot!

  • well, that was an entertaining thread

    AndyRevenko

    Thought I would add another example...

    Like gameglaux said (maybe a little poorly), if you don't want the single tap code to execute, you have to add a delay and wait to see if there is going to be a double-tap. After a short delay, if there has not been a double tap, then you can execute the single tap code. The single tap event will always fire, so you have to come up with a method of waiting. The double tap event does fire if there are two quick taps on the sprite.

    I took up gameglaux's challenge and make a capx where you single tap to destroy a sprite, or double tap to make it flash. It took 4 events (plus two to spawn a new sprite to try again).

    http://www.rieperts.com/games/forum/TapDoubleTap.capx

    Wow, it's the only solution in a whole thread that really works! Thanks a lot for a great example with comments!

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