Delete spawn actors by touch\press

Hi!
Main actor launch by timer(each 5sec) several different spawned actors (A, B, C, D, ...). it is necessary that when you touch the one of the actors (for example A) removed actor A and the other actors A. When you touch actor B removed actor B and the other actors B.....I cannot destroy main actor because a have to many different spawned actors. How to do it?

Comments

  • Andrea_ComisiAndrea_Comisi ItalyMember Posts: 328

    Create four attributes bolean and name it destroy(A,b,c,d,etc) after go to the actor A and create this rule
    When touch is pressed-> change attribute destroyA to true
    Otherwise
    Change attribute destroyA to false

    Crete another rule:
    When attribute destroyA is true
    Destroy actor

    And do the same in the other

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited August 2014

    Here's a demo.

    [Attachment: Destroy same colors.zip]

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.