How to destroy an actor after certain amount of taps?
iKlept
Member Posts: 3
I'm making a game where you tap the objects on the screen a certain amount of taps before they get destroyed.
My question is, is it possible to do that. Destroy an actor after let's say 3 touches/taps (for mobile).
Any help is appreciated.
My question is, is it possible to do that. Destroy an actor after let's say 3 touches/taps (for mobile).
Any help is appreciated.
Comments
Place a rule in the actor that says every time the actor is tapped increase this attribute by +1
Place another rule in the actor that says when this attribute =3 then destroy the actor.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Then make a rule in that actor saying if attribute self.taps >= 3 (or however many number of taps you like) destroy actor.
Make another rule that says if actor receives event touch is press change attribute self.taps to self.taps + 1.
Hope this helps