|
takke Beginner
Joined: 11 Oct 2002 Posts: 29 Location: Sweden
|
Posted: Sat Oct 12, 2002 8:22 pm
Timer |
Hi again.
I have a problem with a timer.
I want a timer to count how many seconds my shild is up.
Say that I start a timmer when I have casted the magical shield, and
it will count until the shild drop. Then I want to save that time in a
variable. Can someone maybe help me with this? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Oct 12, 2002 9:33 pm |
There's only one timer (the tick timer), and it counts down, not up. The way to do this is to record the start time and subtract it from the stop time.
#AL {shield} {cast shield;#VAR shieldstart %secs}
#TR {shield drops} {#MATH shieldtime {(%secs - @shieldstart)/1000};#IF (@shieldtime < 0) {#ADD shieldtime 86400}}
LightBulb
Senior Member |
|
|
|
|
|