What is the difference between a "Change attribute" and a "Constrain attribute"

Bit_EarthBit_Earth Member Posts: 5
edited May 2013 in Working with GS (Mac)
What is the difference between a "Change attribute" and a "Constrain attribute"

Comments

  • BBEnkBBEnk Member Posts: 1,764
    Change attribute only updates once unless its in a rule like a timer.

    Constrain attribute updates constantly which is why you would you it to track players X,Y position.

    Hope this helps.
  • BoomshackBarryBoomshackBarry Member Posts: 712
    edited May 2013
    Change will change the attribute once, whereas constrain will keep the attribute at the value you set.

    For example let's say your score=100.

    If you Change Attribute score to 0, then the score will do a one-time change to 0, and you can then add to score again as usual, effectively resetting the score.

    If you Constrain Attribute score to 0 then the score will be kept at 0 until you stop constraining it, so any value added to score won't work during that time, it will remain 0.

    Hope that's clear? Check out the Cookbook section on this site (click help then select cookbook) for more info on the basics.

    edit: Beat by @BBEnk :)
  • BBEnkBBEnk Member Posts: 1,764
    @BoomshackBarry

    More then one example never hurts when trying to understand something. :-B
  • RiffelRiffel Member Posts: 1,272
    -Change Attribute (Action)
    -Constrain Attribute (Persistent Behavior) Unlike the Change Attribute behavior, this behavior continuously updates the value of one attribute to that of another. For instance, an actors x and y position can continuously be constrained to that of the mouse
Sign In or Register to comment.