Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Gimli
Beginner


Joined: 16 Oct 2005
Posts: 22
Location: Canada

PostPosted: Wed Dec 15, 2010 3:17 am   

Creating a Countdown
 
Ok,

I'm trying to figure out how to create a count down sort of timer this is what I have so far

#ALARM -1
{
#IF(@Timer > 0) {
#ADD Timer -1
}
{
@Timer = 600
}
}

Is that remotely close?
I want to create a seconds countdown starting from 600 (or 10 minutes). Then I use the @timer variable for a guage that shows the time visually.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Dec 15, 2010 1:41 pm   
 
Something like that could work, but you should be aware that there is no guarantee that this will keep proper time. The alarm will try to go off every second, but if other commands are being executed, the alarm may have to wait.

Is there a reason you can't use the built-in tick timer? What are you using this for?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net