lua-users home
lua-l archive

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


Hello
 
I've just started using Lua and found it extremely easy to put into my game engine.  I've got it reading a script, executing, calling functions in a script and a script calling functions in my game without any difficulties.  I've looked in the archive for some answers but it's a bit of a hefty file to read through.  I'm hoping someone can help, all the tutorials I find are pretty much just about calling dofile and getting things up and running. 
 
1) I have a C function called Gui_AddScreen and I want it to return a pointer to a screen.  I can then use this in other calls in the script so I could call Gui_CloseScreen( titleScreen ).  Is this just a lightuserdata?  Or would I have to use something else?
 
2) I'm writing a shoot em up and want the ai controlled by lua scripts.  Is there a recommended way of implementing lots of scripts to run at once?  and for this kind of circumstance, I guess it's quite a common thing people are doing.  Ideally the scripts would also be able to be paused midway. 
 
Thanks
 
Scott