lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



> - Can I "inject" a return into the script via C? (dostring or something
> similar)
> - Or, do I have to abort my wait and then check a value like this:

>   Wait(seconds)
>   if (GetAbortFlag() == 1) then
>     do return end
>   ShowFrame()
>   ...

> That's a lot of code for the slideshow authors to have to include for each
> frame of the show and seems a little messy.  (BTW: the slideshow is in a
> coroutine that yields upon calling Wait() so the game can continue looping.)

Can't you just never resume the coroutine? There is no law saying that you have
to resume it -- just delete all references to it, and it will get garbage collected.