Reply to Re: Timer
If you don't have an account, just leave the password field blank.
You'll need a global variable, so in main.c add:
make_global_int("&yourname", 0);
Call it what you like. When you start the timer, instead of just doing spawn("timer"); do this
&yourname = spawn("timer");
Then to stop it, add one of these lines anywhere in your script:
run_script_by_number(&yourname, "stoptheclock");
will kill the timer but leave the (stopped) time drawn to the screen.
run_script_by_number(&yourname, "kill");
will stop the timer and kill the displayed time.
Nice to know someone's using it
Edit: I was writing this at the same time as Metatarasal
His way is probably what you meant, I wasn't thinking. My way will just kill the timer off.
I mean, use my way if you just want to stop and get rid of the timer.
Use Metatarasal's way if you want something to happen when the timer stops, for example if you have to hit this thing before the time runs out. Put what you want to happen in the right place in timer.c.
make_global_int("&yourname", 0);
Call it what you like. When you start the timer, instead of just doing spawn("timer"); do this
&yourname = spawn("timer");
Then to stop it, add one of these lines anywhere in your script:
run_script_by_number(&yourname, "stoptheclock");
will kill the timer but leave the (stopped) time drawn to the screen.
run_script_by_number(&yourname, "kill");
will stop the timer and kill the displayed time.
Nice to know someone's using it
Edit: I was writing this at the same time as Metatarasal
His way is probably what you meant, I wasn't thinking. My way will just kill the timer off.
I mean, use my way if you just want to stop and get rid of the timer.
Use Metatarasal's way if you want something to happen when the timer stops, for example if you have to hit this thing before the time runs out. Put what you want to happen in the right place in timer.c.







