How to destroy a different actor then 'this actor'

BasGoodboyBasGoodboy Member, PRO Posts: 310
edited August 2013 in Working with GS (Mac)
Hey guys,

I want, on mouse click, to have two certain actors be destroyed other then 'this actor'.

The only rule I can find is.. destroy 'this actor'. Can't I make two others be destroyed after clicking with a mouse on one character that should stay?

Comments

  • BasGoodboyBasGoodboy Member, PRO Posts: 310
    edited August 2013
    Edited main post.
  • -Timo--Timo- Member Posts: 2,313
    yes you can ^^ first make a boolean attribute, lets say we call it 'destroy'
    when mouse button is pressed (or when touch is pressed or whatever you want)
    do
    change attribute 'destroy' to true

    in the actors that have to be destroyed
    if attribute 'destroy' is true
    do
    destroy this actor
  • -Timo--Timo- Member Posts: 2,313
    and if you have 3 actors and all have to be destroyed except for the on you mouse is on
    say

    if touch is pressed
    do
    change attribute 'destroy' to true
    else
    change attribute 'destroy' to false

    in the actors that have to destroyed
    if attribute 'destroy is true and if mouse position is outside
    do
    destroy this actor

    hope this helped
    good luck!

    -Timo-
  • BasGoodboyBasGoodboy Member, PRO Posts: 310
    Im gonna try it, thanks man!
Sign In or Register to comment.