IEntityScriptProxy

C++
struct IEntityScriptProxy : public IEntityProxy {
};
File

IEntityProxy.h

Description

Script proxy interface.

IEntityScriptProxy::CallEvent Method (char *)
C++
virtual void CallEvent(const char * sEvent) = 0;
IEntityScriptProxy::CallEvent Method (char *, EntityId)
C++
virtual void CallEvent(const char * sEvent, EntityId nEntityId) = 0;
IEntityScriptProxy::CallEvent Method (char *, Vec3 &)
C++
virtual void CallEvent(const char * sEvent, const Vec3 & vValue) = 0;
IEntityScriptProxy::CallEvent Method (char *, bool)
C++
virtual void CallEvent(const char * sEvent, bool bValue) = 0;
IEntityScriptProxy::CallEvent Method (char *, char *)
C++
virtual void CallEvent(const char * sEvent, const char * sValue) = 0;
IEntityScriptProxy::CallEvent Method (char *, float)
C++
virtual void CallEvent(const char * sEvent, float fValue) = 0;
IEntityScriptProxy::ChangeScript Method
C++
virtual void ChangeScript(IEntityScript* pScript, SEntitySpawnParams * params) = 0;
Parameters
Parameters
Description
IEntityScript* pScript
an entity script object that has already been loaded with the new script
SEntitySpawnParams * params
parameters used to set the properties table if required
Description

Change the Entity Script used by the Script Proxy. Caller is responsible for making sure new script is initialised and script bound as required

IEntityScriptProxy::GetScriptTable Method
C++
virtual IScriptTable* GetScriptTable() = 0;
IEntityScriptProxy::GetState Method
C++
virtual const char* GetState() = 0;
Description

Retrieves name of the currently active entity script state. Return: Name of current state.

IEntityScriptProxy::GetStateId Method
C++
virtual int GetStateId() = 0;
Description

Retrieves the id of the currently active entity script state. Return: Index of current state.

IEntityScriptProxy::GotoState Method
C++
virtual bool GotoState(const char * sStateName) = 0;
Description

Change current state of the entity script. Return: If state was successfully set.

IEntityScriptProxy::GotoStateId Method
C++
virtual bool GotoStateId(int nStateId) = 0;
Description

Change current state of the entity script. Return: If state was successfully set.

IEntityScriptProxy::IsInState Method
C++
virtual bool IsInState(const char * sStateName) = 0;
Parameters
Parameters
Description
const char * sStateName
Name of state table within entity script (case sensetive).
Return
If entity script is in specified state.
Description

Check if entity is in specified state.

IEntityScriptProxy::SendScriptEvent Method (int, IScriptTable *, bool *)
C++
virtual void SendScriptEvent(int Event, IScriptTable * pParamters, bool * pRet = NULL) = 0;
Description

Fires an event in the entity script. This will call OnEvent(id,param) Lua function in entity script, so that script can handle this event.

See Also

EScriptEventId, IScriptObject

IEntityScriptProxy::SendScriptEvent Method (int, char *, bool *)
C++
virtual void SendScriptEvent(int Event, const char * str, bool * pRet = NULL) = 0;
IEntityScriptProxy::SendScriptEvent Method (int, int, bool *)
C++
virtual void SendScriptEvent(int Event, int nParam, bool * pRet = NULL) = 0;
IEntityScriptProxy::SetScriptUpdateRate Method
C++
virtual void SetScriptUpdateRate(float fUpdateEveryNSeconds) = 0;