|
EnigmafromRI Newbie
Joined: 17 Feb 2004 Posts: 7 Location: USA
|
Posted: Wed Feb 18, 2004 6:10 am
Timer |
Curiousity struck me again today. We have a quest system. I wanted to look into having a timer count down to the next quest in the status bar. Is that possible? If not would the status window serve better for this task? As for the triggers and such I can do those alone for the actual quest time. Just wanted to know if it is at all possible??
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Feb 18, 2004 3:35 pm |
Sure, just create an alarm that fires every second (*1 will do) and have this alarm decrement a counter variable each time. Then, initialize the counter variable with whatever you need and put it in the status bar.
|
|
|
|
EnigmafromRI Newbie
Joined: 17 Feb 2004 Posts: 7 Location: USA
|
Posted: Thu Feb 19, 2004 7:50 am |
Its changing the numbers way too fast.
Here is what I have so far
#trigger You may quest in (%w) minutes
#variable questtimer %1
#alarm *1 {#math questtimer {questtimer-1}}
Its prolly typed out all wrong and I tried
but again the numbers are counting down way
too fast.
While I have you ear. Would #alarm mm {THE CORRECT ANSWER}
display the timer in the status bar in minutes?[?] |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Feb 19, 2004 8:23 pm |
Well yes. If you are trying to count down MINUTES, a one-SECOND alarm will be way too fast. Also, you're looking for a number so you should probably be using %d rather than %w in your pattern.
#ST Next quest: @qtime min
#TR {You may quest in (%d) minute} {
#VAR qtimer %1
#ALA qclock *60 {#ADD qtimer -1;#IF (@qtimer < 0) {#VAR qtimer 0}}} |
|
|
|
|
|