Actor destroy question...

EagleoneEagleone Member Posts: 97
edited December 2011 in Working with GS (Mac)
Hi,

I have an actor on the screen (we'll call it actor A). And when you touch this actor it is destroyed.

Is it possible to have another actor on the screen, and when this actor is touched, Actor A doesn't get destroyed if you touch it? So basically once you touch the new actor, if you touch actor A, nothing happens.

Comments

  • POMPOM Member Posts: 2,599
    Sure , make a game attribute - boolean - call it "prevent destroy"

    Then in your actor B make a rule :
    When touch is pressed , change "game.prevent destroy" To true

    Then in your Actor A , make this rule :
    when "game.prevent destroy" IS false
    In this make another rule:
    When touch is pressed
    Destroy .

    This way you actor A will be destroyed only if you didn't pressed actor B before.

    Roy.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited December 2011
    EDIT: P-O-M is on fire today!
  • EagleoneEagleone Member Posts: 97
    edited December 2011
    Thank you very much for that.

    Sometimes my own question embarrass me because the answers are so easy to work out. Still a noob, obviously.

    Thanks to both of you.
Sign In or Register to comment.