Original Post
hi everyone - and happy new year! Just a quick LUA question from me. I want to call C functions from LUA scripts that may or may not halt execution of the LUA script. Either this is fantastically easy and i've not seen it somehow, or it's totally not the way things work. Imagine a LUA script - script script ... Do_animation() -- this calls C code n number of times. The LUA script is executed each game cycle. Do_animation would do it's thing until it's finished - at which point it says it's done and allows the LUA script to continue. I suppose it could look like this - do n = Do_animation() if n==0 return; until n>0 perhaps? If there was a hard Quit-processing-lua-script command, the i could wrap my C calls into Lua functions which ran a loop as above. I've always coded up my own script/interpretters in the past and put this functionality right at the heart of the interpretter, previously. Can I make LUA do it? tony