Help with countdown timer bar
knedy
Member Posts: 7
Hi All
Is there a way to make a countdown timer bar that actually stops or pauses when a button is pressed or attribute is changed?
I tried using interpolate, to no avail. I am working on a windows computer so the demos that have been suggested in the forums don't work for me.
I would appreciate any suggestions and advice.
THANKS!
Is there a way to make a countdown timer bar that actually stops or pauses when a button is pressed or attribute is changed?
I tried using interpolate, to no avail. I am working on a windows computer so the demos that have been suggested in the forums don't work for me.
I would appreciate any suggestions and advice.
THANKS!
Best Answer
-
tatiang Posts: 11,949In order to pause time, you have to create your own timer attribute rather than using the built-in game.time, scene.time, or self.time.
Sorry, the attached file is a Mac project file. The attributes are game.TimeLeft (real) and game.Paused (index). Here are the rules:
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
Thanks for responding. I actually figured out a different approach that worked very well for me, and it is somewhat similar to yours.
I used tshirtbooths health bar tutorial and added a few things to convert it to a countdown bar timer.
If any ones interested in how I did this, let me know.
Thanks again Tatiang