Destroy a chain of selected actors
ozonostudio
Member Posts: 10
Hi i'm creating a cube game, but i need destroy a chain of selected actors, you tap one time to select and if you tap the second time you can destroy a chain of selected actors, but i don't know how do it
Comments
Make a game integer attribute called 'tap count' or whatever you want to call it. Open the actor that you will be tapping on.
Set the 1st rule: When 'actor receives event' ---- 'touch' ---- 'inside'.
(Then add the following behaviour): Change attribute 'tap count' to 'tap count+1'
Now add a second rule (to this same actor if you want it to be destroyed too when you tap it twice):
2nd rule: When 'attribute' --- 'tap count' = '2'
(Then add the behaviour): 'destroy'
Put the 2nd rule into every actor that you want destroyed by the two taps.
Put the 1st rule rule into any actor that you want to be able to trigger off the destruction.
Put both rules into any actor that you want to be able to both trigger off the destruction and be destroyed as well.
Hope this helps.
Chobbipod.