Double tap and tap events on the sprite

Discussion and feedback on Construct 2

Post » Tue Feb 14, 2017 3:15 pm

AndyRevenko wrote:
lamar wrote:
gameglaux wrote:@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!
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,825

Post » Tue Feb 14, 2017 3:23 pm

Please keep posts civil.

@lamar
Never use the term 'fail' on a user, especially one requesting help. Not pleasant or polite.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266

Post » Tue Feb 14, 2017 3:30 pm

zenox98 wrote: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!
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,825

Post » Wed Feb 15, 2017 2:46 am

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
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Sun Feb 26, 2017 1:01 pm

AllanR wrote: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!
B
9
S
2
Posts: 34
Reputation: 603

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests