trying to display countdown based on timer, but stop at 0
Leanne
Member Posts: 168
display text 10-self.time, but would like it to stop at 0 instead of going into negative numbers. I have tried a number of different ways to know avail. Wondering if anyone has a quick answer.
Comments
if 10-self.time ≥ 0
display text 10-selftime
otherwise
display text 0
I did try to make an attribute, change game.attribute to 10-self.time
then, if game.attribute is greater than or equal to 0, display text 10-self.time, otherwise display 0, buy it still goes down past 0.
this should be simple, right?
(1)
Rule: When self.Time [less than or equal to] 10
...DisplayText 10-self.time
Otherwise
...DisplayText 0
(2)
Constrain attribute self.TimeLeft (index) to 10-self.Time
DisplayText self.TimeLeft
Note: index attributes are limited to >= 0 values so it won't go negative, but you'll only see the integer values counting down.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User