An all-round trigger entity for calling script methods when something enters the trigger volume. More...

Public Member Functions | |
| Activate () | |
| Activates this trigger. More... | |
| Deactivate () | |
| Deactivates this trigger. More... | |
| boolean | IsActive () |
| Returns whether this trigger entity is currently active. More... | |
| OnTrigger (entity Other) | |
| User-defined callback for trigger events. More... | |
Public Member Functions inherited from BaseEntityT | |
| string | GetName () |
| Returns the name of this entity. More... | |
| x y z | GetOrigin () |
| Returns the origin of this entity as a triple of numbers. More... | |
| SetOrigin (number x, number y, number z) | |
| Sets a new position for this entity. More... | |
An all-round trigger entity for calling script methods when something enters the trigger volume.
A trigger entity is composed of brushes that define the trigger volume. If a player (or in fact, any other entity) walks into the trigger volume, the user-defined OnTrigger(entity Other) method is automatically called, whose given parameter Other is the entity that entered the volume and thereby caused the trigger to fire.
Note that the OnTrigger() callback is only called when the trigger is active. Newly created triggers are active by default.
Trigger | Activate | ( | ) |
Activates this trigger.
| Deactivate | ( | ) |
Deactivates this trigger.
| boolean IsActive | ( | ) |
Returns whether this trigger entity is currently active.
| OnTrigger | ( | entity | Other | ) |
User-defined callback for trigger events.
You do normally not call this method yourself, but instead you define it in your map script: It is called automatically whenever another entity enters the trigger volume.
See these map script for usage examples:
| Other | The other game entity that entered our trigger volume. |