Difference between revisions of "CAutoTrigger (CS)"
(Typo) |
m |
(2 intermediate revisions by one other user not shown) | |
(No difference)
|
Latest revision as of 02:56, 24 May 2018
Contents
Basic Information
- Classname: CAutoTrigger.
- Inheriting Instances: trigger_auto.
- Description: This entity fires its target the moment the map has loaded.
Class Hierarchy
- CBaseEntity
- CBaseDelay
- CAutoTrigger (trigger_auto)
- CBaseDelay
Entity Data
W = Windows | L = Linux
Name | W. Offset | L. Offset | L. Diff | Type | Description |
---|---|---|---|---|---|
m_globalstate | 36 | 40 | +4 | int | None. |
triggerType | 37 | 42 | +4 | USE_TYPE | enum USE_TYPE { USE_OFF = 0, USE_ON = 1, USE_SET = 2, USE_TOGGLE = 3 }; |
Entity Attributes
- Target (target) - When an entity is activated, it triggers the entity with the name specified by Target.
- Delay before trigger (delay) - Usually the time in seconds before an entity should trigger its target (after being triggered itself). Under other SmartEdit names, delay might also be the time to wait before performing some other action.
- KillTarget (killtarget) - When an entity is triggered, it will remove from the game the entity specified by this property.
- Global State to Read (globalstate) - The name of a global variable (set by an env_global). This variable sets the state of the trigger_auto.
- Trigger State (triggerstate) - Sets the type of trigger the trigger_auto sends (0 = Off 1 = On 2 = Toggle).
Entity Flags
// Spawn flags #define SF_AUTO_FIREONCE 0x0001 // Remove On fire (1) - If this is set, the trigger_auto will be removed from the game after firing.
Notes
- Setting 'Delay before trigger' to something like 0.2 is a good idea, because it's possible for the trigger_auto to fire before the entity it targets has even been spawned.
- Usually the Trigger State is On.
HLSDK Reference
- triggers.cpp (line 107)