Destrying 2 or more actors with one touch

DisimobDisimob Member, PRO Posts: 32

Hi everyone,
My game spawned a lot of actors.
I need that when 2 or more actors are in the same place ( or are really close) user can destroy all them by only one touch and get more points. hoping you unerstand my problem... Thanks

Comments

  • Daniel543MDaniel543M Member, PRO Posts: 47

    If I understand the question right, you can do something like this:

    Create a Boolean game attribute. Call it something like "colliding"

    Rule: When touch AND If actor colliding with another actor
    Do: Change attribute 'colliding' to TRUE

    Put this next rule in the actor(s) you want to destroy

    Rule: If colliding is TRUE
    Do: Change attribute 'colliding' to FALSE, Give points & Destroy

    Is this what you meant?

  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2015

    @Disimob said:
    Hi everyone,
    My game spawned a lot of actors.
    I need that when 2 or more actors are in the same place ( or are really close) user can destroy all them by only one touch and get more points. hoping you unerstand my problem... Thanks

    You could use magnitude to detect all the actors within a certain range of your touch.

    Example attached.

Sign In or Register to comment.