|
letuandk Newbie
Joined: 08 Jan 2018 Posts: 1
|
Posted: Mon Jan 08, 2018 9:55 pm
Multiple timers in Status window |
Hi,
Being the control freak that I am, I wanted to experiment with timers regarding my prots. My layout at the moment is that I have the status window on the left side of my mud window, with a lot of information, like most of the prots in the mud.
I also made so that the appear/disappear when prots go on/off which is really nice. Now, I would like to add a timer in the status window, beside the prots currently on.
For example, it would look like:
Prot 1 [time]
prot 2 [time]
etc
The time would increase as it does, so that I can keep track on for how long they have been up and so on. Is this possible at the moment?
I have been reading up on timers but nothing seems to be able to do what I want to do. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Mon Jan 08, 2018 10:59 pm |
Well... it is possible, but it would require more variables
#ALARM "countDown" -1 {
#IF (@prot1>0) {prot1=(@prot1-1);#IF (@prot1=0) {#T+ Prot1Button}}
#IF (@prot2>0) {prot2=(@prot2-1);#IF (@prot2=0) {#T+ Prot2Button}}
//repeat as needed for all your counters
}
Then in your #STWIN object, you can reference all the current remaining times in seconds. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Mon Jan 08, 2018 11:12 pm |
Oops totally misread that. Same principle though.
#ALARM "countUp" -1 {
#IF (!%class(prot1Button)) {prot1=(@prot1+1)}
#IF (!%class(prot2Button)) {prot2=(@prot2+1)}
//and so on, just remember to zero out the variable where applicable
}
This one will only increment when the respective buttons are not enabled |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|