Best way to tap multiple times to destroy?
Hey all
I am looking for the best way to make the following happen. I have had a little play around but still struggling to make it work properly
Essentially I want the user to tap an object 5 times, then destroy the actor.
Any ideas? thanks in advance
I am looking for the best way to make the following happen. I have had a little play around but still struggling to make it work properly
Essentially I want the user to tap an object 5 times, then destroy the actor.
Any ideas? thanks in advance
Comments
Use the "Rule:Actor receives event Touch is released" to increment an Attribute and prevent it from adding multiple times while the object is beeing pressed.
create a local attribute on the actor called count
when touch is pressed count = count +1 when count >= 5 destroy actorthe reason I put count >= 5 is if they hit the actor too quick it could jump from 4 to 6 and miss the value of 5.