Attribute Equaling another Attribute

eligameseligames Member, PRO Posts: 40

How do you make one attribute equal another like when one attribute increases how do you increase the other one automatically?

Comments

  • AdrenalineAdrenaline Member Posts: 523

    If you want attribute A to equal attribute B (even when B changes), use a constrain behavior.

    Constrain A to B.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Use a constraint when you have a fluid value such as rotation, position, or velocity. If you're simply changing an integer value such as a score, you don't need to constrain (constantly update) the attribute. In that case, just change both attributes at the same time using two change attribute behaviors.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    Also, depending on how your logic works, it may be beneficial to use a rule saying:

    when A is > B
    Change B to A

    But it comes down to what you are trying to accomplish with the values.

    Follow us: Twitter - Website

Sign In or Register to comment.