noob question - limiting range of an attribute
bubblegmkd
Member Posts: 12
I want to say: display the speed of a character but want to have it within a certain range say 0-100. I have tried min and max expressions but I'm not getting expected results....Can anyone point me in the right direction.
thanks
Comments
min(100,max(0,self.Speed))
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
What if that was a range of an attribute....example game-current speed mph and I want to limit it to a range of 0-100?
This would just be for a display text behavior....
thanks for the quick reply!
Did you try the expression I posted?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I believe I have figured it out....but any suggestions would still be appreciated as it might help me streamline the process or give more food for thought.
thank you!
Suggestions about what? I'm happy to provide food for thought but not really sure what direction you're going in. Maybe you can describe more about what you're trying to do. The expression I posted should work...
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User