Difference between revisions of "CAutoTrigger (CS)"
(Added some contents.) |
|||
Line 1: | Line 1: | ||
− | [[Category:CS | + | [[Category:CS Class List]] |
− | *[[CBaseEntity | + | == Basic Information == |
− | ** [[CBaseDelay | + | |
+ | * '''Classname''': CAutoTrigger. <br /> | ||
+ | * '''Inheriting Instances''': trigger_auto.<br /> | ||
+ | * '''Description''': This entity fires its target the moment the map has loaded. <br /> | ||
+ | |||
+ | |||
+ | == Class Hierarchy == | ||
+ | |||
+ | * [[CBaseEntity (CS)|CBaseEntity]] | ||
+ | ** [[CBaseDelay (CS)|CBaseDelay]] | ||
*** '''CAutoTrigger''' ''(trigger_auto)'' | *** '''CAutoTrigger''' ''(trigger_auto)'' | ||
− | <tt> | + | == Entity Data == |
+ | |||
+ | <tt>W = Windows |</tt><tt> L = Linux</tt> | ||
{| cellpadding="4" | {| cellpadding="4" | ||
|- class="t2th" | |- class="t2th" | ||
Line 14: | Line 25: | ||
| m_globalstate | | m_globalstate | ||
| style="text-align:center" | 36 | | style="text-align:center" | 36 | ||
− | | style="text-align:center" | | + | | style="text-align:center" | 40 |
− | | style="text-align:center" | + | + | | style="text-align:center" | +4 |
| style="text-align:center" | int | | style="text-align:center" | int | ||
| None. | | None. | ||
|- class="t2td" | |- class="t2td" | ||
| triggerType | | triggerType | ||
− | | style="text-align:center" | | + | | style="text-align:center" | 37 |
− | | style="text-align:center" | | + | | style="text-align:center" | 42 |
− | | style="text-align:center" | + | + | | style="text-align:center" | +4 |
| style="text-align:center" | USE_TYPE | | style="text-align:center" | USE_TYPE | ||
| <pawn> | | <pawn> | ||
Line 30: | Line 41: | ||
− | == | + | == 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 == | ||
<pawn> | <pawn> | ||
// Spawn flags | // Spawn flags | ||
− | #define SF_AUTO_FIREONCE 0x0001 | + | #define SF_AUTO_FIREONCE 0x0001 // Remove On fire (1) - If this is set, the trigger_auto will be removed from the game after firing. |
</pawn> | </pawn> | ||
+ | |||
+ | |||
+ | == 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 == | ||
+ | |||
+ | * [http://svn.tcwonline.org/viewvc.cgi/hlsdk/dlls/effects.h?view=markup&root=amxmodx effects.h] ''(line 105)'' | ||
+ | * [http://svn.tcwonline.org/viewvc.cgi/hlsdk/dlls/effects.cpp?view=markup&root=amxmodx effects.cpp] ''(line 438)'' | ||
+ | |||
+ | |||
+ | == Related Links == | ||
+ | |||
+ | * [http://twhl.co.za/wiki.php?id=10 TWHL] |
Revision as of 07:34, 29 August 2009
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
- effects.h (line 105)
- effects.cpp (line 438)