-
Posted by jc on Sun, 27 Mar 2011 19:52:52
Is there a delay (like sleep in other languages) within LUA. What I need is a delay to stop for few seconds and then go ahead again.
Something like this - or do you know a better method in LUA?:
function wait(seconds) local _start = os.time() local _end = _start+seconds while (_end ~= os.time()) do end end
Thanks
PS: Btw Jim - I get it done - thanks for the tip with the colors not working within chatframe - saved me alot of time and headache!!
-
Posted by jnwhiteh on Sun, 27 Mar 2011 20:43:00
No, because any delay like that would freeze the entire WoW client for the duration of the 'delay'. You can use an OnUpdate timer to do something after a period of time.
-
Posted by jc on Mon, 28 Mar 2011 06:40:23
Thanks Jim - you are right. OnUpdate was what I was looking for. So let's get back to Chapter 19.
Thanks for your quick support!! Really appreciate it.