Added ability to attach Lua/MapScript callbacks to a trigger. Can be set to work with complex trigger actions.

Added scripts path to Lua so that Lua can find scripts within scripts/
This commit is contained in:
nev6502
2020-06-14 23:51:31 -06:00
parent fb4d3f272c
commit 4a7a3df2cc
6 changed files with 180 additions and 16 deletions
+5
View File
@@ -1,6 +1,9 @@
// MapScript.h
//
#ifndef MAPSCRIPT_H
#define MAPSCRIPT_H
// Lua is written in C, so compiler needs to know how to link its libraries
extern "C" {
# include "lua.h"
@@ -15,6 +18,8 @@ class MapScript {
public:
bool Init(const char* mapName);
void CallFunction(const char* functionName);
void SetLuaPath(const char* input_path);
private:
lua_State* L;
};
#endif