How pause a lua script in xlua?
How to Pause a lua script running in xlua?
(without busy-waiting)
I tried to find How to, but only to fail, fail and fail.
a. Using 'while' command : busy waiting, fail
b. Using coroutine : xlua doesn`t support coroutine...
c. Using C lib : ............... I tried. but cannot found.
Only I need is .....
Pause a script for a while without busy-waiting in xlua
like 'sleep()' function in C.
please help me out...
Re: How pause a lua script in xlua?
Quote:
b. Using coroutine : xlua doesn`t support coroutine...
Well, it does. Retriever2 actually made me an example before. I'll see where I can find it.
EDIT: Here it is. http://hocuspocus.taloncrossing.com/rii/coroutine.zip
I'm sure he allows me to link it here, as it's n his public directory anyway. ;)
Re: How pause a lua script in xlua?
Quote:
Originally Posted by Looki
Well, it does. Retriever2 actually made me an example before. I'll see where I can find it.
Cool example, in the events it says Zephni's Lua Example though but im guessing thats maybe another nick used by Retriever2. In any case thanks for posting. :)
Re: How pause a lua script in xlua?
Ah, actually, I forgot about that part. :blush:
He didn't release it because he didn't actually make it - It was just an updated/modified version of Zephni's old example.
Re: How pause a lua script in xlua?
Yes, it's not my example. In fact I didn't even port it, I just fixed some bugs! So credit to where credit is due, but regardless I think it's a helpful example.
Re: How pause a lua script in xlua?
Oh! Thanks for help and really useful Example!
I didn`t realize xlua does support coroutine!
Re: How pause a lua script in xlua?
I'm the one who ported the code for that example, and Retriever2 fixed it for me!
http://www.create-games.com/forum_post.asp?id=264058&show=all
I asked some other questions on that thread about coroutines too, and I refer back to it whenever I forget something. :D
Re: How pause a lua script in xlua?
Hi UrbanMonk. That link on TDC goes to a page that does not exist. Thought I would let you know.
Marv
Re: How pause a lua script in xlua?
It works for me ... maybe they require you to be registered and logged in?
Re: How pause a lua script in xlua?
Why, but anyway I get 404 now.
Marv