ID:175195
 
Is it possible to make a loop out of repop so that every X minutes it would turn on?

If so what's a good way to do it without completely trashing and lagging down your game?
Ok, what you need to do is overwrite world.New(), so that it spawn()'s a loop.
world
New()
..()
spawn(30) Repopulate() //Wait 3 seconds, then call the Repopulate() proc.
proc
Repopulate()
repop()
spawn(X) Repopulate() //Wait X seconds, then call the Repopulate() proc again.

What Ive done here is make it so that it spawns the Repopulate proc once when the world is created, then X amount of time after the Repopulate() proc returns.