[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua_call --- but which script?
- From: erik@... (Erik Hougaard)
- Date: Sun, 11 Mar 2001 23:19:48 +0100
----- Original Message -----
> I am currently trying to implement LUA into our real time strategy game.
> our map editor, the designer is able to create trigger points which, once
> activated, call a LUA function in the mission script. The name of the
> function to call and the function script is written by our designers. So,
> read the script, pushed function name and parameters, and tried lua_call.
> The problem is, that LUA does not know it's script. Normally, I use
> lua_dobuffer to execute a script, but in this case, I only want to call a
> special function of a script. So, how do I tell LUA, in which script
> the function is located?
Well lua_call can only call function that are already in your memory space,
so one solution would be to lua_dobuffer all your script at the beginning so
they are available for you to lua_call later on.