NWNX:EE  8193.36.12
nwnx_lua.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_Lua = "NWNX_Lua";
8 
11 void NWNX_Lua_EvalVoid(string sCode);
12 
16 string NWNX_Lua_Eval(string sCode);
17 
22 void NWNX_Lua_RunEvent(string sEvent, object oObject, string sExtra="");
23 
25 
26 void NWNX_Lua_EvalVoid(string sCode)
27 {
28  string sFunc = "EvalVoid";
29 
31  NWNX_CallFunction(NWNX_Lua, sFunc);
32 }
33 
34 string NWNX_Lua_Eval(string sCode)
35 {
36  string sFunc = "Eval";
37 
39  NWNX_CallFunction(NWNX_Lua, sFunc);
41 }
42 
43 void NWNX_Lua_RunEvent(string sEvent, object oObject, string sExtra="")
44 {
45  string sFunc = "RunEvent";
46 
48  NWNX_PushArgumentObject(oObject);
50  NWNX_CallFunction(NWNX_Lua, sFunc);
51 }
NWNX_Lua_Eval
string NWNX_Lua_Eval(string sCode)
Evaluate LUA code and return the output.
Definition: nwnx_lua.nss:34
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_GetReturnValueString
string NWNX_GetReturnValueString()
Returns the specified type from the c++ side.
Definition: nwnx.nss:109
NWNX_PushArgumentString
void NWNX_PushArgumentString(string value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:74
NWNX_Lua_RunEvent
void NWNX_Lua_RunEvent(string sEvent, object oObject, string sExtra="")
Generate events in NWScript to receive on the Lua side.
Definition: nwnx_lua.nss:43
NWNX_PushArgumentObject
void NWNX_PushArgumentObject(object value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:69
NWNX_Lua_EvalVoid
void NWNX_Lua_EvalVoid(string sCode)
Evaluate LUA code.
Definition: nwnx_lua.nss:26