object.motion.linearvelocity.X never gets to 0

azavegaazavega Member Posts: 362
edited November -1 in Working with GS (Mac)
Ok I put a couple of dummy actors to control the linear velocity of my object X,Y and they never gets to 0 they r always flicking changing numbers... so my condition or rule never gonna work... I have already drag on my object set to 50 and 100 and 500 but the object doesn't stop... any help how to solve this... how to detect that the object is not moving anymore?

Comments

  • ORBZORBZ Member Posts: 1,304
    If magnitude(linVelX,linVelY) < 2
    Move 0
  • azavegaazavega Member Posts: 362
    ok guys thanks a lot ill try this
  • azavegaazavega Member Posts: 362
    hey there I cant use any of those as a rule cause the software doesn't let me edit the attribute condition, so i can put one condition but not and expression.. how you guys do it?
  • azavegaazavega Member Posts: 362
    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
  • forkliftforklift Member Posts: 386
    Are you asking 'how do you use an if statement'?
  • azavegaazavega Member Posts: 362
    nope what im asking is how do i put " magnitude(linVelX,linVelY) < 2" in a rule if besides the attribute appears just an attribute browser not an expresion editor

    Is cause i got the free version of gamesald?
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Answered in the other thread.

    Create an attribute self.Threshold with a default value of 2.
    Then,
    Rule When self.Threshold > magnitude(linVelX,linVelY) ...
Sign In or Register to comment.