Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
ScriptEngine.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3 Copyright 2005-2012 Pierre-Michel Ricordel
4 Copyright 2007-2012 Thomas Fischer
5 Copyright 2013-2020 Petr Ohlidal
6
7 For more information, see http://www.rigsofrods.org/
8
9 Rigs of Rods is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License version 3, as
11 published by the Free Software Foundation.
12
13 Rigs of Rods is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20*/
21
25
26#pragma once
27
28#ifdef USE_ANGELSCRIPT
29
30#define DEFAULT_TERRAIN_SCRIPT "default.as" // Used when map creator doesn't provide custom script.
31
32#include "AngelScriptBindings.h"
33#include "Application.h"
34#include "GameContext.h"
35#include "GameScript.h"
37#include "ScriptEvents.h"
38
39#include <Ogre.h>
40#include "scriptdictionary/scriptdictionary.h"
41#include "scriptbuilder/scriptbuilder.h"
42
43#include <map>
44
45namespace RoR {
46
49
51inline void TRIGGER_EVENT_ASYNC(scriptEvents type, int arg1, int arg2ex = 0, int arg3ex = 0, int arg4ex = 0, std::string arg5ex = "", std::string arg6ex = "", std::string arg7ex = "", std::string arg8ex = "")
52{
53 ScriptEventArgs* args = new ScriptEventArgs{ type, arg1, arg2ex, arg3ex, arg4ex, arg5ex, arg6ex, arg7ex, arg8ex };
55}
56
59{
60 INVALID,
61 ACTOR,
62 TERRAIN,
63 GADGET,
64 CUSTOM
65};
66
68
71{
72 ScriptUnit();
74
77 unsigned int eventMask = 0;
78 AngelScript::asIScriptModule* scriptModule = nullptr;
79 AngelScript::asIScriptFunction* frameStepFunctionPtr = nullptr;
80 AngelScript::asIScriptFunction* eventCallbackFunctionPtr = nullptr;
81 AngelScript::asIScriptFunction* eventCallbackExFunctionPtr = nullptr;
82 AngelScript::asIScriptFunction* defaultEventCallbackFunctionPtr = nullptr;
85 Ogre::String scriptName;
86 Ogre::String scriptHash;
87 Ogre::String scriptBuffer;
88};
89
90typedef std::map<ScriptUnitID_t, ScriptUnit> ScriptUnitMap;
91
99
107
112
113// Params to `RoR::ScriptEngine::getFunctionByDeclAndLogCandidates()`
114const std::string GETFUNC_DEFAULTEVENTCALLBACK_SIGFMT = "void {}(int, string, string, int)";
115const std::string GETFUNC_DEFAULTEVENTCALLBACK_NAME = "defaultEventCallback";
116
119{
120 // Generic success - 0 by common convention.
121 SCRIPTRETCODE_SUCCESS = AngelScript::asSUCCESS, // = AngelScript::0
122
123 // AngelScript technical codes
124 SCRIPTRETCODE_AS_ERROR = AngelScript::asERROR, // = AngelScript::-1 etc...
125 SCRIPTRETCODE_AS_CONTEXT_ACTIVE = AngelScript::asCONTEXT_ACTIVE,
126 SCRIPTRETCODE_AS_CONTEXT_NOT_FINISHED = AngelScript::asCONTEXT_NOT_FINISHED,
127 SCRIPTRETCODE_AS_CONTEXT_NOT_PREPARED = AngelScript::asCONTEXT_NOT_PREPARED,
128 SCRIPTRETCODE_AS_INVALID_ARG = AngelScript::asINVALID_ARG,
129 SCRIPTRETCODE_AS_NO_FUNCTION = AngelScript::asNO_FUNCTION,
130 SCRIPTRETCODE_AS_NOT_SUPPORTED = AngelScript::asNOT_SUPPORTED,
131 SCRIPTRETCODE_AS_INVALID_NAME = AngelScript::asINVALID_NAME,
132 SCRIPTRETCODE_AS_NAME_TAKEN = AngelScript::asNAME_TAKEN,
133 SCRIPTRETCODE_AS_INVALID_DECLARATION = AngelScript::asINVALID_DECLARATION,
134 SCRIPTRETCODE_AS_INVALID_OBJECT = AngelScript::asINVALID_OBJECT,
135 SCRIPTRETCODE_AS_INVALID_TYPE = AngelScript::asINVALID_TYPE,
136 SCRIPTRETCODE_AS_ALREADY_REGISTERED = AngelScript::asALREADY_REGISTERED,
137 SCRIPTRETCODE_AS_MULTIPLE_FUNCTIONS = AngelScript::asMULTIPLE_FUNCTIONS,
138 SCRIPTRETCODE_AS_NO_MODULE = AngelScript::asNO_MODULE,
139 SCRIPTRETCODE_AS_NO_GLOBAL_VAR = AngelScript::asNO_GLOBAL_VAR,
140 SCRIPTRETCODE_AS_INVALID_CONFIGURATION = AngelScript::asINVALID_CONFIGURATION,
141 SCRIPTRETCODE_AS_INVALID_INTERFACE = AngelScript::asINVALID_INTERFACE,
142 SCRIPTRETCODE_AS_CANT_BIND_ALL_FUNCTIONS = AngelScript::asCANT_BIND_ALL_FUNCTIONS,
143 SCRIPTRETCODE_AS_LOWER_ARRAY_DIMENSION_NOT_REGISTERED = AngelScript::asLOWER_ARRAY_DIMENSION_NOT_REGISTERED,
144 SCRIPTRETCODE_AS_WRONG_CONFIG_GROUP = AngelScript::asWRONG_CONFIG_GROUP,
145 SCRIPTRETCODE_AS_CONFIG_GROUP_IS_IN_USE = AngelScript::asCONFIG_GROUP_IS_IN_USE,
146 SCRIPTRETCODE_AS_ILLEGAL_BEHAVIOUR_FOR_TYPE = AngelScript::asILLEGAL_BEHAVIOUR_FOR_TYPE,
147 SCRIPTRETCODE_AS_WRONG_CALLING_CONV = AngelScript::asWRONG_CALLING_CONV,
148 SCRIPTRETCODE_AS_BUILD_IN_PROGRESS = AngelScript::asBUILD_IN_PROGRESS,
149 SCRIPTRETCODE_AS_INIT_GLOBAL_VARS_FAILED = AngelScript::asINIT_GLOBAL_VARS_FAILED,
150 SCRIPTRETCODE_AS_OUT_OF_MEMORY = AngelScript::asOUT_OF_MEMORY,
151 SCRIPTRETCODE_AS_MODULE_IS_IN_USE = AngelScript::asMODULE_IS_IN_USE,
152
153 // RoR ScriptEngine return codes
154 // Following is analysis of former state (most but not all funcs returned 0 on success)
155 // ~ executeString() [script: not exported] - used to return 0 on success, 1 on internal error and negative number otherwise.
156 // ~ addFunction() [script: `game.addScriptFunction()`] - used to return 0 on success, 1 on internal error and negative number otherwise.
157 // ~ functionExists() [script: `game.scriptFunctionExists()`] - used to return function ID (always >0) on success, negative number on error.
158 // ~ deleteFunction() [script: `game.deleteScriptFunction()`] - used to return function ID (always >0) on success, negative number on error.
159 // ~ addVariable() [script: `game.addScriptVariable()` ] - used to return 0 on success, 1 on internal error and negative number otherwise.
160 // ~ variableExists() [script: `game.scriptVariableExists()`] - newly added, returns 0 on success and negative number otherwise.
161 // ~ deleteVariable() [script: `game.deleteScriptVariable()` ] - used to return 0 on success, 1 on internal error and negative number otherwise.
162 // ~ getVariable() [script: `game.getScriptVariable()` ] - recently added, returns 0 on success and negative number otherwise.
166 SCRIPTRETCODE_SCRIPTUNIT_NOT_EXISTS = -1004, // The scpecified ScriptUnitID_t was invalid
169};
170
175class ScriptEngine : public Ogre::LogListener
176{
177 friend class GameScript;
178
179public:
180
181 ScriptEngine();
183
192 ScriptUnitID_t loadScript(Ogre::String filename, ScriptCategory category = ScriptCategory::TERRAIN,
193 ActorPtr associatedActor = nullptr, std::string buffer = "");
194
199 void unloadScript(ScriptUnitID_t unique_id);
200
205 void framestep(Ogre::Real dt);
206
207 void setForwardScriptLogToConsole(bool doForward);
208
213 void triggerEvent(scriptEvents eventnum, int arg1=0, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="");
214
215 void setEventsEnabled(bool val) { m_events_enabled = val; }
216
221 ScriptRetCode_t executeString(Ogre::String command);
222
229 void queueStringForExecution(const Ogre::String command);
230
236 ScriptRetCode_t addFunction(const Ogre::String& arg, const ScriptUnitID_t nid = SCRIPTUNITID_DEFAULT);
237
242 ScriptRetCode_t functionExists(const Ogre::String& arg, const ScriptUnitID_t nid = SCRIPTUNITID_DEFAULT);
243
248 ScriptRetCode_t deleteFunction(const Ogre::String& arg, const ScriptUnitID_t nid = SCRIPTUNITID_DEFAULT);
249
254 ScriptRetCode_t addVariable(const Ogre::String& arg, const ScriptUnitID_t nid = SCRIPTUNITID_DEFAULT);
255
260 ScriptRetCode_t variableExists(const Ogre::String& arg, const ScriptUnitID_t nid = SCRIPTUNITID_DEFAULT);
261
266 ScriptRetCode_t deleteVariable(const Ogre::String& arg, const ScriptUnitID_t nid = SCRIPTUNITID_DEFAULT);
267
271 ScriptRetCode_t getVariable(const Ogre::String& varName, void *ref, int typeID, ScriptUnitID_t nid = SCRIPTUNITID_DEFAULT);
272
277 AngelScript::asIScriptFunction* getFunctionByDeclAndLogCandidates(ScriptUnitID_t nid, GetFuncFlags_t flags, const std::string& funcName, const std::string& fmtFuncDecl);
278
279 int fireEvent(std::string instanceName, float intensity);
280
281 void envokeCallback(int functionId, eventsource_t* source, NodeNum_t nodenum = NODENUM_INVALID, int type = 0);
282
289 void forwardExceptionAsScriptEvent(const std::string& from);
290
291 AngelScript::asIScriptEngine* getEngine() { return engine; };
292
293 // method from Ogre::LogListener
294 void messageLogged(const Ogre::String& message, Ogre::LogMessageLevel lml, bool maskDebug, const Ogre::String& logName, bool& skipThisMessage);
295
296 inline void SLOG(const char* msg) { this->scriptLog->logMessage(msg); }
297 inline void SLOG(std::string msg) { this->scriptLog->logMessage(msg); }
298
299 bool scriptUnitExists(ScriptUnitID_t unique_id);
303 ScriptUnitMap const& getScriptUnits() const { return m_script_units; }
304
305protected:
306
309
313 void init();
314
318 Ogre::String composeModuleName(Ogre::String const& scriptName, ScriptCategory origin, ScriptUnitID_t id);
319
324 int setupScriptUnit(int unit_id);
325
330 bool prepareContextAndHandleErrors(ScriptUnitID_t nid, int asFunctionID);
331
337
342 ScriptRetCode_t validateScriptModule(const ScriptUnitID_t nid, AngelScript::asIScriptModule*& out_mod);
343
345
348
352 void msgCallback(const AngelScript::asSMessageInfo* msg);
353
358 void lineCallback(AngelScript::asIScriptContext* ctx);
359
364 void exceptionCallback(AngelScript::asIScriptContext* ctx);
365
367
368 AngelScript::asIScriptEngine* engine;
369 AngelScript::asIScriptContext* context;
370 Ogre::Log* scriptLog;
376 bool m_events_enabled = true;
377
379};
380
382
383} // namespace RoR
384
385#else // USE_ANGELSCRIPT
386inline void TRIGGER_EVENT_ASYNC(scriptEvents type, int arg1, int arg2ex = 0, int arg3ex = 0, int arg4ex = 0, std::string arg5ex = "", std::string arg6ex = "", std::string arg7ex = "", std::string arg8ex = "")
387{
388}
389#endif // USE_ANGELSCRIPT
Central state/object manager and communications hub.
#define BITMASK(OFFSET)
Definition BitFlags.h:10
uint32_t BitMask_t
Definition BitFlags.h:7
Game state manager and message-queue provider.
this class is a helper to exchange data in a class between different threads, it can be pushed and pu...
void PushMessage(Message m)
Doesn't guarantee order! Use ChainMessage() if order matters.
Proxy class that can be called by script functions.
Definition GameScript.h:42
This class represents the angelscript scripting interface.
ScriptUnit & getScriptUnit(ScriptUnitID_t unique_id)
ScriptUnitID_t getTerrainScriptUnit() const
ScriptRetCode_t variableExists(const Ogre::String &arg, const ScriptUnitID_t nid=SCRIPTUNITID_DEFAULT)
Adds a global variable to the script.
ScriptUnitID_t m_terrain_script_unit
void exceptionCallback(AngelScript::asIScriptContext *ctx)
Optional callback invoked when the script critically fails, allowing debugging.
bool m_events_enabled
Hack to enable fast shutdown without cleanup.
ScriptRetCode_t deleteVariable(const Ogre::String &arg, const ScriptUnitID_t nid=SCRIPTUNITID_DEFAULT)
Deletes a global variable from the script.
void forwardExceptionAsScriptEvent(const std::string &from)
Forwards useful info from C++ try{}catch{} exceptions to script in the form of game event.
ScriptRetCode_t addVariable(const Ogre::String &arg, const ScriptUnitID_t nid=SCRIPTUNITID_DEFAULT)
Adds a global variable to the script.
scriptEvents m_currently_executing_event_trigger
GameScript m_game_script
ScriptUnitMap m_script_units
void setEventsEnabled(bool val)
int setupScriptUnit(int unit_id)
Helper for loadScript(), does the actual building without worry about unit management.
AngelScript::asIScriptEngine * engine
instance of the scripting engine
ScriptUnitID_t loadScript(Ogre::String filename, ScriptCategory category=ScriptCategory::TERRAIN, ActorPtr associatedActor=nullptr, std::string buffer="")
Loads a script.
bool scriptUnitExists(ScriptUnitID_t unique_id)
Ogre::Log * scriptLog
int fireEvent(std::string instanceName, float intensity)
ScriptRetCode_t deleteFunction(const Ogre::String &arg, const ScriptUnitID_t nid=SCRIPTUNITID_DEFAULT)
Deletes a global function from the script.
int executeContextAndHandleErrors(ScriptUnitID_t nid)
Helper for executing any script function/snippet; registers Line/Exception callbacks (on demand) and ...
InterThreadStoreVector< Ogre::String > stringExecutionQueue
The string execution queue.
ScriptUnitMap const & getScriptUnits() const
void msgCallback(const AngelScript::asSMessageInfo *msg)
Optional (but very recommended!) callback providing diagnostic info when things fail to start (most n...
void SLOG(const char *msg)
Replacement of macro.
ScriptRetCode_t getVariable(const Ogre::String &varName, void *ref, int typeID, ScriptUnitID_t nid=SCRIPTUNITID_DEFAULT)
Retrieves a global variable from any running script.
ScriptRetCode_t addFunction(const Ogre::String &arg, const ScriptUnitID_t nid=SCRIPTUNITID_DEFAULT)
Adds a global function to the script.
ScriptUnitID_t getCurrentlyExecutingScriptUnit() const
ScriptRetCode_t executeString(Ogre::String command)
executes a string (useful for the console)
ScriptRetCode_t validateScriptModule(const ScriptUnitID_t nid, AngelScript::asIScriptModule *&out_mod)
Helper for all manipulations with functions/variables; ensures the script unit exists and is fully se...
AngelScript::asIScriptContext * context
context in which all scripting happens
void queueStringForExecution(const Ogre::String command)
Queues a string for execution.
void envokeCallback(int functionId, eventsource_t *source, NodeNum_t nodenum=NODENUM_INVALID, int type=0)
void messageLogged(const Ogre::String &message, Ogre::LogMessageLevel lml, bool maskDebug, const Ogre::String &logName, bool &skipThisMessage)
ScriptUnitID_t m_currently_executing_script_unit
AngelScript::asIScriptFunction * getFunctionByDeclAndLogCandidates(ScriptUnitID_t nid, GetFuncFlags_t flags, const std::string &funcName, const std::string &fmtFuncDecl)
Finds a function by full declaration, and if not found, finds candidates by name and logs them to Ang...
void lineCallback(AngelScript::asIScriptContext *ctx)
Optional callback which receives diagnostic info for every executed statement.
Ogre::String composeModuleName(Ogre::String const &scriptName, ScriptCategory origin, ScriptUnitID_t id)
Packs name + important info to one string, for logging and reporting purposes.
ScriptRetCode_t functionExists(const Ogre::String &arg, const ScriptUnitID_t nid=SCRIPTUNITID_DEFAULT)
Checks if a global function exists.
AngelScript::asIScriptEngine * getEngine()
bool prepareContextAndHandleErrors(ScriptUnitID_t nid, int asFunctionID)
Helper for executing any script function/snippet; does asIScriptContext::Prepare() and reports any er...
void setForwardScriptLogToConsole(bool doForward)
void init()
This function initialzies the engine and registeres all types.
void framestep(Ogre::Real dt)
Calls the script's framestep function to be able to use timed things inside the script.
void triggerEvent(scriptEvents eventnum, int arg1=0, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="")
triggers an event; Not to be used by the end-user.
void unloadScript(ScriptUnitID_t unique_id)
Unloads a script.
void SLOG(std::string msg)
Replacement of macro.
@ MSG_SIM_SCRIPT_EVENT_TRIGGERED
Payload = RoR::ScriptEventArgs* (owner)
ScriptCategory
Note: Either of these can be loaded from script using game.pushMessage(MSG_APP_LOAD_SCRIPT_REQUESTED....
const std::string GETFUNC_DEFAULTEVENTCALLBACK_NAME
ScriptRetCode
Common return codes for script manipulation funcs (add/get/delete | funcs/variables)
BitMask_t GetFuncFlags_t
Flags for RoR::ScriptEngine::getFunctionByDeclAndLogCandidates()
void TRIGGER_EVENT_ASYNC(scriptEvents type, int arg1, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="")
Asynchronously (via MSG_SIM_SCRIPT_EVENT_TRIGGERED) invoke script function eventCallbackEx(),...
std::map< ScriptUnitID_t, ScriptUnit > ScriptUnitMap
const GetFuncFlags_t GETFUNCFLAG_OPTIONAL
Only logs warning if candidate is found, to help modder find a typo.
const std::string GETFUNC_DEFAULTEVENTCALLBACK_SIGFMT
const GetFuncFlags_t GETFUNCFLAG_REQUIRED
Always logs warning that function was not found.
const GetFuncFlags_t GETFUNCFLAG_SILENT
Never logs.
const char * ScriptCategoryToString(ScriptCategory c)
@ CUSTOM
Loaded by user via either: A) ingame console 'loadscript'; B) RoR.cfg 'app_custom_scripts'; C) comman...
@ GADGET
Associated with a .gadget mod file, launched via UI or any method given below for CUSTOM scripts (use...
@ TERRAIN
Defined in terrn2 file under '[Scripts]', receives terrain eventbox notifications.
@ ACTOR
Defined in truck file under 'scripts', contains global variable BeamClass@ thisActor.
@ SCRIPTRETCODE_SUCCESS
@ SCRIPTRETCODE_AS_CONTEXT_ACTIVE
@ SCRIPTRETCODE_AS_INVALID_TYPE
@ SCRIPTRETCODE_AS_CANT_BIND_ALL_FUNCTIONS
@ SCRIPTRETCODE_AS_MODULE_IS_IN_USE
@ SCRIPTRETCODE_AS_INVALID_NAME
@ SCRIPTRETCODE_AS_ERROR
@ SCRIPTRETCODE_AS_NAME_TAKEN
@ SCRIPTRETCODE_ENGINE_NOT_CREATED
@ SCRIPTRETCODE_AS_WRONG_CALLING_CONV
@ SCRIPTRETCODE_AS_ILLEGAL_BEHAVIOUR_FOR_TYPE
@ SCRIPTRETCODE_SCRIPTUNIT_NOT_EXISTS
@ SCRIPTRETCODE_AS_LOWER_ARRAY_DIMENSION_NOT_REGISTERED
@ SCRIPTRETCODE_AS_OUT_OF_MEMORY
@ SCRIPTRETCODE_UNSPECIFIED_ERROR
@ SCRIPTRETCODE_AS_NO_GLOBAL_VAR
@ SCRIPTRETCODE_AS_INVALID_ARG
@ SCRIPTRETCODE_AS_NO_FUNCTION
@ SCRIPTRETCODE_AS_MULTIPLE_FUNCTIONS
@ SCRIPTRETCODE_AS_BUILD_IN_PROGRESS
@ SCRIPTRETCODE_AS_NO_MODULE
@ SCRIPTRETCODE_AS_WRONG_CONFIG_GROUP
@ SCRIPTRETCODE_AS_CONTEXT_NOT_FINISHED
@ SCRIPTRETCODE_AS_INVALID_INTERFACE
@ SCRIPTRETCODE_AS_CONTEXT_NOT_PREPARED
@ SCRIPTRETCODE_CONTEXT_NOT_CREATED
@ SCRIPTRETCODE_AS_INVALID_DECLARATION
@ SCRIPTRETCODE_AS_INVALID_CONFIGURATION
@ SCRIPTRETCODE_AS_NOT_SUPPORTED
@ SCRIPTRETCODE_AS_ALREADY_REGISTERED
@ SCRIPTRETCODE_AS_INVALID_OBJECT
@ SCRIPTRETCODE_AS_CONFIG_GROUP_IS_IN_USE
@ SCRIPTRETCODE_AS_INIT_GLOBAL_VARS_FAILED
@ SCRIPTRETCODE_SCRIPTUNIT_NO_MODULE
@ SCRIPTRETCODE_FUNCTION_NOT_EXISTS
GameContext * GetGameContext()
static const NodeNum_t NODENUM_INVALID
int ActorInstanceID_t
Unique sequentially generated ID of an actor in session. Use ActorManager::GetActorById()
int ScriptRetCode_t
see enum RoR::ScriptRetCode - combines AngelScript codes and RoR internal codes.
int ScriptUnitID_t
Unique sequentially generated ID of a loaded and running scriptin session. Use ScriptEngine::getScrip...
static const ActorInstanceID_t ACTORINSTANCEID_INVALID
static const ScriptUnitID_t SCRIPTUNITID_INVALID
scriptEvents
This enum describes what events are existing. The script can register to receive events.
@ SE_NO_EVENTS
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
static const ScriptUnitID_t SCRIPTUNITID_DEFAULT
The script defined in .terrn2 [Scripts], or 'default.as' ~ classic behavior.
std::string lsr_filename
Load from resource ('.as' file or '.gadget' file); If buffer is supplied, use this as display name on...
ScriptCategory lsr_category
std::string lsr_buffer
Load from memory buffer.
ActorInstanceID_t lsr_associated_actor
For ScriptCategory::ACTOR.
Unified game event system - all requests and state changes are reported using a message.
Definition GameContext.h:52
eventsource_t * eventsource
ScriptCallbackArgs(eventsource_t *evs, NodeNum_t nd)
Args for eventCallbackEx() queued via MSG_SIM_SCRIPT_EVENT_TRIGGERED See descriptions at enum RoR::sc...
Represents a loaded script and all associated resources/handles.
CacheEntryPtr originatingGadget
For ScriptCategory::GADGET ~ determines resource group.
ScriptCategory scriptCategory
AngelScript::asIScriptFunction * frameStepFunctionPtr
script function pointer to the frameStep function
unsigned int eventMask
filter mask for script events
Ogre::String scriptHash
Ogre::String scriptBuffer
AngelScript::asIScriptFunction * defaultEventCallbackFunctionPtr
script function pointer for spawner events
Ogre::String scriptName
Name of the '.as' file exclusively.
AngelScript::asIScriptFunction * eventCallbackFunctionPtr
script function pointer to the event callback function
AngelScript::asIScriptModule * scriptModule
AngelScript::asIScriptFunction * eventCallbackExFunctionPtr
script function pointer to the event callback function
ActorPtr associatedActor
For ScriptCategory::ACTOR.
ScriptUnitID_t uniqueId
< Scripting
Definition Collisions.h:41