ID:269275
 
Could I have a small example of a mob calling a proc which loops, and could go on through-out the whole game without cuasing massive lag?
mob
New()
..()
spawn(rand(1,60)) Loop()
proc/Loop()
set background=1
while(KeepGoing)
// Do stuff
sleep(10)


That's the only stuff I can think of doing.
Check out Deadron's Event Loop: http://developer.byond.com/hub/Deadron/EventLoop

He even has a Simple Loop demo there :-)