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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Sat Oct 08, 2005 6:35 pm   

timer
 
hey. i have an idea of something i would like to do. but cant work out how to do it right. its quite a simple idea..

i want a timer in my status bar. so when for example....

#trigger {You have lost eq} {timer start}

#trigger {you have regained eq} {#timer stop}

so my status bar would just show the number of seconds left on that timer. the reason i dont want to use #TIMER is because i want multiple timers running at once.

thanks
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Oct 08, 2005 7:59 pm   
 
This one's easy. In the status bar, include the variable that will represent the current time left in the alarm. In your #alarm trigger, use an #IF statement to check for 0 or 1. If it's greater than that number, #ADD VarName -1 to decrement it. If it's equal to or less than it, reset it to the timer max. Every time the alarm fires it will update the variable and the update will be reflected in the status bar.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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