Help with countdown timer bar

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!

Best Answer

  • tatiangtatiang Posts: 11,949
    edited December 2012 Accepted Answer
    In 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:

    image

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • knedyknedy Member Posts: 7
    Hey Tatiang

    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
Sign In or Register to comment.