the magnituted condition can't use it

azavegaazavega Member Posts: 362
edited November -1 in Working with GS (Mac)
I can use any of the condition you guys give me cause i cant edit the expression bisides the attributes rule...
to explain better in the rules beside the attribute opens and attribute browser not and expression editor if you guys have any other way to do it please let me know

Comments

  • RHRH Member Posts: 1,079
    What?

    EDIT: I'm not trying to be unhelpful, it's just that that is written very badly.
  • forkliftforklift Member Posts: 386
    If you're trying to add rules from the attribute window, it won't work. They are two separate things.

    This is where you pick attributes (such as mouse position x,y, etc)
    http://gamesalad.com/wiki/interface_reference:attribute_browser

    This is where you set parameters and rules, use math, etc.
    http://gamesalad.com/wiki/interface_reference:expression_editor

    Does this clear things up?
  • azavegaazavega Member Posts: 362
    i understand clearly my question is how to put an expresion like if magnitude(linVelX,linVelY) < 2 in a rule...
  • RHRH Member Posts: 1,079
    Oh right, just constrain a self. attribute to that equation then use if attribute self.attribute < 2
  • azavegaazavega Member Posts: 362
    ok that attribute is going to be real or integer
  • RHRH Member Posts: 1,079
    depends on the scale, i.e if the max value is 3 use real, if max is 300, i'd use integer, but you can use real
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Don't use a a constrain attribute on an attribute if it isn't going to change.
    Its even easier and less processor heavy if you just make an attribute and give it a static number.

    Create an actor attribute. self.Number and set the value to 2. (Using your example)

    Then have the Rule check, If self.Number > magnitude(linVelX,linVelY)
Sign In or Register to comment.