Rule with attribute won't work

inkoqnitoinkoqnito Member Posts: 16
edited March 2012 in Working with GS (Mac)
Hello!
in my game you collect things with a ship, so for the first levels i just one thing on screen to collect at the same time. So i made an boolean attribute and if this is false i spawn an actor and set the boolean to true this way it will spawn it one time, and the moment it gets collected i destroy it and put the boolean back to false. And then a new actor should be spawned because the attribute now is false again. It worked first but then it just stopped to work.

Does anyone knew why?

This should work shouldn't it?

Kind regards

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    edited March 2012
    the changeAttribute: boolean … must be placed above the Destroy Behavior …
    once an actor is destroyed the computer no longer does any thing that comes after that command

    EX:
    on your itemActor:
    Rule: when
    Event: overlaps/collides with ship
    --changeAttribute: boolean to false
    --Destroy this actor

    @};- MH
Sign In or Register to comment.