lua-users home
lua-l archive

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


I still cannot see how I can get the C code working. How do I stop my lua_dofile from blocking my applications main loop from executing?

For example I run a script that runs my mission. How can the game render while the mission is running? The script never returns. If someone can suggest a way that doesn't block my games code from executing I'll also need some kind of C function to resume that script periodically.

I thank everyone for their help but nobody seems to suggest what I should be doing ni C to make this all work.

Ignacio, are you suggesting that my game script need to call in to my C code to 'resume'. If that is so doesn't it mean that the misson script will need to know how to drive the game, rather than just be concerned about the mission at hand?

> -----Original Message-----
> From: Ignacio Castaño [mailto:castanyo@yahoo.es]
> Sent: Wednesday, 21 May 2003 10:47 AM
> To: Lua list
> Subject: Re: Game Integration
> 
> 
> I don't think in term of scripts but in term of entities or 
> actors. An actor
> has a given state and that state may have an associated 
> script. When the
> actor enters the state it starts executing the script. The script may
> contain a yield in its body, but usually, those yields are 
> associated to
> other events, for example:

<snip> 


NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.