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
remus
Wanderer


Joined: 06 Jul 2002
Posts: 53
Location: Australia

PostPosted: Sun Aug 28, 2005 7:06 pm   

Displaying an #Alarm as a button?
 
I have a set of alarms that I would like to be able to keep a visual track of. When it was only one it was a simple matter of just using the timer. Now that I have 3 that all fire at varying times I was wondering if it is possible to display them within gauge buttons or even just simply as buttons as one displays variables?
_________________
Once the Known was unknown now its Known...
Do you know it???
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Aug 28, 2005 8:18 pm   
 
Yep, it's possible. All you need to do is create a button, two variables (one for current value and one for max value), and a *1 alarm for each alarm you want to display.

The button can be any type, though I recommend gauge-type. For gauges, you need to set the minimum/low value to 0, the max value equal to the max-value variable (use the variable name like so: @max), and set the colors as you want. You also need to set the Value field of the gauge to the current-value variable (ie, @current).

The *1 alarm is there to iterate through the countdown. Use #ADD @current -1, where @current is your current-value variable.

In your original alarm, you need to set the max-value variable to the alarm duration. You then need to set the current-value variable to the max-value variable.

If done correctly, you should see the countdown automatically.
_________________
EDIT: I didn't like my old signature
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Sun Aug 28, 2005 8:46 pm   
 
Would it not be better to use named alarms and %alarm(NamedAlarm) for the current value and set max value of the gauge to the miliseconds of the alarm, instead of creating an extra alarm that fires every second?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Aug 29, 2005 1:50 am   
 
Doesn't appear to work right. Might just be me or 7.13a, but in order to get the gauge to update I have to click on it. Otherwise it does return the correct values.
_________________
EDIT: I didn't like my old signature
Reply with quote
remus
Wanderer


Joined: 06 Jul 2002
Posts: 53
Location: Australia

PostPosted: Wed Aug 31, 2005 2:45 pm   
 
Worked it out. Thanks!
_________________
Once the Known was unknown now its Known...
Do you know it???
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