ID:178496
 
I need to make a timer that ticks down every second.
I know how to do that, a simple looping proc, with spawn that reduces a variable by 1 every time it runs...

The problem is I need it to be run by the server, at the time the world starts, because it needs to effect the whole game.
I cant seem to work out how to call a proc at the point the server starts.
How about making something like this,

proc/Ticker()//notice not a proc for any particular atom
spawn while(1)
sleep(10)
++time
var
time = 0
world
New()
..()
Ticker()


world/New() is called when the game starts up, and is the usual place for putting any startup code or initialization.
In response to Lesbian Assassin
I usually just put in proc()
proc being the procs title on log in and have a world variable that says if it has been done yet like so.
if(ticking == 0)
proc()