|
fattony Apprentice
Joined: 27 Dec 2001 Posts: 105 Location: USA
|
Posted: Wed Mar 13, 2002 4:43 am
Timers & Variables |
I've been working with the #ALARM command for a couple weeks now, trying to figure out a way to make 4 timers (essentially the same as the tick timer). Basically, I have 4 things that I need to count from 1 to 100 seconds, and store each's current second in a variable that can be displayed in the status window. Is this possible?
Fat Tony |
|
|
|
dracx Beginner
Joined: 14 Oct 2000 Posts: 26 Location: USA
|
Posted: Wed Mar 13, 2002 4:50 am |
Yes, but the commands in the alarm will need to update each variable's value each tick. something like this...
#ADD var1 -1
#ADD var2 -1
#ADD var3 -1
#ADD var4 -1
Each time the alarm goes off, each variable will be decremented, and it should update in the status window just peachily.
Dracx |
|
|
|
fattony Apprentice
Joined: 27 Dec 2001 Posts: 105 Location: USA
|
Posted: Wed Mar 13, 2002 4:56 am |
How would that work though? The commands would only execute when the timer has reached the end, by my understanding.
Fat Tony |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Mar 13, 2002 1:44 pm |
Instead of having an alarm that fires every 100 second, you create an alarm that fires every second and a counter variable that is incremented every second. When the counter variable reaches 100, reset it to 0.
Kjata |
|
|
|
dracx Beginner
Joined: 14 Oct 2000 Posts: 26 Location: USA
|
Posted: Thu Mar 14, 2002 3:18 am |
#ALARM * {#SAY this fires every second.}
Dracx |
|
|
|
|
|