Forever

PhanielPhaniel Member Posts: 34
edited March 2012 in Working with GS (Mac)
I have and attribute in on of my actors. I also have an game attribute. How can I make it so that whenever the actor attribute is true than the game attribute is true and whenever the actor attribute is false than the game attribute is false. It will always check instead of just once. Like a forever rule. Any help?

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    use constrain
  • CloudsClouds Member Posts: 1,599
    In the actor's rules:

    Constrain Game Attribute to: Actor Attribute.
  • MotherHooseMotherHoose Member Posts: 2,456
    Rule: when
    Attribute: self.whatever = false
    -changeAttribute: game.whatever To: false
    Otherwise:
    -changeAttribute: game.whatever To: true

    the rule's condition should be the initial value of the boolean

    put a displayText on the actor … Text: self.whatever
    create a displayText on the scene … Text: game.whatever
    so you can see what is happening … delete them when things work right!

    of course @calvin9403 constrain works just as well!
    a constrain is constantly monitored/tracked …
    a rule only triggers when the condition/attribute changes …
    it is your choice!

    @};- MH
    "Games lubricate the body and the mind." — Benjamin Franklin
  • calvin9403calvin9403 Member Posts: 3,186
    @Mh I think your way is better, how can I forgot about that?

    P.S. constrain uses a lot of memory
Sign In or Register to comment.