ID:159039
 
is there a way to change sleep into somthing else but still having the same affect like instead of sleep(30) it would be cooldown(30)
bump
In response to Goggeeta
Don't bump your topic only an hour after you've posted it... Did you really expect people to reply immediately*? Don't you know what a forum is? It's not a real-time communication medium, like a chatroom. It can take day(s) to get a response.
The rule here is not to bump your topic until it has been at least 24 hours since the last reply in it, and it's no longer on the front page, and rightfully so; bumping after an hour is quite spamish.

*: Especially as you were so vague and didn't really say what you want... the readers of your post can't read your mind. You need to actually express what you want fully and specify what you want in detail if you want us to have a good idea of what you're talking about.
proc/cooldown(n as num)
sleep(n)
return

// cooldown(10) would have the same effect as sleep(10)

mob/verb/Test()
cooldown(10)
src<<"Delay one second complete!"


I'm guessing you mean something similar to that. It's not really "changing" sleep()'s name, but it's creating an alternative proc that imitates sleep() using the sleep() proc. Hopefully that makes sense.
In response to Duelmaster409
About your code, I'll make sure you know that the "as num" and "return" are useless there and aren't required. Anyway, I dunno if that's what he meant, since that'd be normally pointless, and I don't see time "mesurments" tying in a lot either. But if you want to for some reason, you can essentially "rename" (not really, of course) any proc you want (and do more) with the power of #defines. If you do:
#define wait sleep

...then everywhere (well, not exactly everywhere) you write "wait" in your code later on (the #define must come first), it will be treated as "sleep" when compiling. So if you write wait(10), it will compile the same as sleep(10). Essentially "wait" is another symbol for "sleep" now.
In response to Kaioken
Ah, I didn't quite know that. Thanks for informing me.

But really, I don't see why anyone would want to rename BYOND's default proceedures.