ID:155731
 
Hello, I want to know if it is possible to override the built-in sleep() proc, since it is not defined under any BYOND datum structure.


sleep(Delay)
Delay = Delay/world.tick_lag
..()


This is roughly what I am trying to do, but I don't know where sleep() exists.
You can't, but you could either write your own sleep function, or change world.tick_lag.
I wouldn't suggest doing this, but it's a cool trick:
//In your .dme file
#define sleep mysleep
// BEGIN_INCLUDE
#include "code.dm"
// END_INCLUDE
#undef sleep
proc/mysleep(delay)
// do whatever
sleep(num)
Make a seperate procedure:

proc
Sleep(delay)
sleep(delay/wold.tick_lag)