|
A Trigger is a volume of space that initiates script callbacks when objects pass through the Trigger. More...
Public Member Functions | |
int | getNumObjects () |
Get the number of objects that are within the Trigger's bounds. | |
int | getObject (int index) |
Retrieve the requested object that is within the Trigger's bounds. | |
Callbacks | |
void | onAdd (int objectId) |
Called when the Trigger is being created. | |
void | onRemove (int objectId) |
Called just before the Trigger is deleted. | |
Public Attributes | |
string | enterCommand |
The command to execute when an object enters this trigger. Object id stored in %obj. Maximum 1023 characters. | |
string | leaveCommand |
The command to execute when an object leaves this trigger. Object id stored in %obj. Maximum 1023 characters. | |
floatList | polyhedron |
Defines a non-rectangular area for the trigger. | |
string | tickCommand |
The command to execute while an object is inside this trigger. Maximum 1023 characters. | |
Static Public Attributes | |
static bool | isRenderable |
Disables rendering of all instances of this type. | |
static bool | isSelectable |
Disables selection of all instances of this type. | |
static bool | renderTriggers |
Forces all Trigger's to render. |
A Trigger is a volume of space that initiates script callbacks when objects pass through the Trigger.
TriggerData provides the callbacks for the Trigger when an object enters, stays inside or leaves the Trigger's volume.
int Trigger::getNumObjects | ( | ) |
Get the number of objects that are within the Trigger's bounds.
int Trigger::getObject | ( | int | index | ) |
Retrieve the requested object that is within the Trigger's bounds.
index | Index of the object to get (range is 0 to getNumObjects()-1) |
void Trigger::onAdd | ( | int | objectId | ) |
void Trigger::onRemove | ( | int | objectId | ) |
string Trigger::enterCommand |
The command to execute when an object enters this trigger. Object id stored in %obj. Maximum 1023 characters.
bool Trigger::isRenderable [static] |
Disables rendering of all instances of this type.
Reimplemented from GameBase.
bool Trigger::isSelectable [static] |
Disables selection of all instances of this type.
Reimplemented from GameBase.
string Trigger::leaveCommand |
The command to execute when an object leaves this trigger. Object id stored in %obj. Maximum 1023 characters.
floatList Trigger::polyhedron |
Defines a non-rectangular area for the trigger.
Rather than the standard rectangular bounds, this optional parameter defines a quadrilateral trigger area. The quadrilateral is defined as a corner point followed by three vectors representing the edges extending from the corner.
string Trigger::tickCommand |
The command to execute while an object is inside this trigger. Maximum 1023 characters.