lua-users home
lua-l archive

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


 
while encounter_Living("DemoEncounter") > 0 do
 -- Do something while the encounter is alive --
end
ui_Print("Encounter Killed");

A fundamental question is whether you really need to have the encounter loop in Lua. An alternative usage pattern is to have the "encounter loop" on the C side, and generate events from that loop which are handled in Lua. The code above looks somewhat like "busy waiting". Of course, I do not know the specifics of your framework, so this suggestion might be off. 

André