Sign in to follow this  
Followers 0
Vooruit!

Running timer

3 posts in this topic

How is one supposed to know whether a specific timer is running? In the emulator, there's a timer.Running property available, which works fine. WhereYouGo doesn't support this however.

Right now, I'm using a variable that is set to true when the timer is started, but it seems such a stupid solution.

0

Share this post


Link to post

In the early days, I tried to find a property that indicated how many seconds remained on a timer, but none existed.  I think timer.Running was one of those things that wasn't apparent to anyone working on a player or builder, either.

I agree the best way is to use a variable of your own creation.  Don't tie it to the variables that are persisted across cartridge restores, however, or you might end up with the wrong value.  As you likely know, all previously-running timers expire upon cartridge restore.

0

Share this post


Link to post

Good catch. I'm using a timer to loop the (eerie) background music. Haven't thought yet of the cartridge's state when restoring.

0

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0