Basic countdown bar
February 22nd, 2006
I have barely touched the game world, but one common thing that shows up in many games is a bar that ticks down your last moments of time. A question for a countdown timer is often brought up in forums, and there are many examples of timers kicking around everywhere from the built in behaviors to other samples on the web.
Here is a really quick one that just reduces the size of a QD (quick draw) rectangle. It used the _system.milliseconds for checking time on the exitFrame of a behavior applied to the QD rect sprite.
Source code for countdown time
Entry Filed under: Basic Lingo,Demo Files,Quick answer
2 Comments Add your own
1. MultimediaGuy | February 21st, 2006 at 8:51 pm
I noticed an error in the source code and updated that this evening. Had a line that could end up with the divide by 0 error. Not good!
2. MultimediaGuy | February 22nd, 2006 at 8:53 pm
More about clocks:
http://director-online.com/buildArticle.php?id=297
http://director-online.com/buildArticle.php?id=3
http://director-online.com/buildArticle.php?id=350
Enjoy.
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed