JMW
Aspiring Addon Developer
Managed to load the script ok -
Still struggling with changing value even of what I think is a global variable (alt & altid in 35B/aap lua file which is identical to dg/aap except for control outcome).
Tried varying forms to change variables:
OR
OR
l
then
Any further help with this would be very welcome.
My current quest however is to dis-engage all autopilots (hdg/spd/alt) running in Script, from the .dll
Is there a command that will do this that I can call from within the .dll, and if so how?
I've tried manipulating the values of the variables, I think without success -
Is there a way to check if the variables have been changed? - some sort of debug (gotta be simple for me to set up)
Or could someone "point" me in the right direction.
Obliged,
JMW
Code:
int ShuttlePB::clbkGeneric (int msgid, int prm, void *context)
{
switch (msgid) {
case VMSG_LUAINTERPRETER:
lua_State *L = (lua_State*)context;
luaL_dofile (L, "Script\\35B\\aap.lua");
}
return 0;
}
Tried varying forms to change variables:
Code:
lua_pushnumber(L, headto);
lua_setglobal(L, "hdg");
Code:
lua_getglobal(L, "aap.hdg");
lua_pushnumber(L, headto);
lua_setfield(L, -2, "hdg");
l
Code:
lua_getglobal(L, "aap");
lua_pushnumber(L, 1000);
lua_setfield(L, -2, "alt");
Code:
return VMSG_LUAINTERPRETER;
My current quest however is to dis-engage all autopilots (hdg/spd/alt) running in Script, from the .dll
Is there a command that will do this that I can call from within the .dll, and if so how?
I've tried manipulating the values of the variables, I think without success -
Is there a way to check if the variables have been changed? - some sort of debug (gotta be simple for me to set up)
Or could someone "point" me in the right direction.
Obliged,
JMW