Double tap
TackyAttack
Member Posts: 141
Is there anyway to add more than one tap like you have to tap a spot two, three, four, or five times?
Comments
With that in mind, I would do something like this...
This goes under your button!
If touch is PRESSED change attribute game.tap to (game.tap+1)%2
that will cycle between 0,1,
This goes under whatever is performing the action!
If game.tap = 0 do nothing
if game.tap = 1 perform action
After 1 sec change game.tap to 0 (this way it seems like a true double tap & will not just keep adding up)
If you want more than 2 taps just change
(game.tap+1)%2 <------- this number to how ever many taps. (2,3,4,5)
You may need to tweak this, but should give ya a general idea...
EDIT: Repeat after me... Modulus is my friend. I will love Modulus. I will Modulus til death or /0 do us part....