Trigger wind: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Format please)
 
(cleaned up)
Line 1: Line 1:
trigger_wind
{{wrongtitle|title=trigger_wind}}


==Entity Description==
A trigger volume that pushes physics objects that touch it.
A trigger volume that pushes physics objects that touch it.


KEYS
==Availability==
{{in game|brush}} {{game-base}}
{{in code|class=CTriggerWind|file=triggers.cpp}}


Name targetname <target_source> The name that other entities refer to this entity by.
==Keyvalues==
*{{kv trigger}}
*{{kv angles}}
*'''Speed'''
:<integer> The baseline for how hard the wind blows.
*'''SpeedNoise'''
:<integer> Amount of random noise (fluctuation, not sound) added to wind speed.
*'''DirectionNoise'''
:<integer> Amount of noise (fluctuation, not sound) added to wind direction.
*'''HoldTime'''
:<integer> Baseline for how long to wait before changing wind.
*'''HoldNoise'''
:<integer> Amount of random noise (fluctuation, not sound) added to '''HoldTime'''.


Parent parentname <target_destination> The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
==Flags==
*{{fl trigger}}


Origin (X Y Z) origin <origin> The position of this entity's center in the world. Rotating entities typically rotate around their origin.
==Inputs==
*{{i trigger}}
*'''SetSpeed <integer>'''
:Set the baseline for how hard the wind blows.


Start Disabled StartDisabled <choices>
==Outputs==
*{{o trigger}}


Global Entity Name globalname <string> Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.
==See also==
*[[env_wind]]
*[[env_rotorwash]]


spawnflags spawnflags <flags>
[[Category:Entities]]
 
Filter Name filtername <filterclass> Filter to use to see if activator triggers me. See filter_activator_name for more explanation.
 
Pitch Yaw Roll (Y Z X) angles <angle> This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
 
Speed Speed <integer> The baseline for how hard the wind blows.
 
Speed Noise SpeedNoise <integer> Noise added to wind speed +/-
 
Direction Noise DirectionNoise <integer> Noise added to wind direction.
 
Hold Time HoldTime <integer> Baseline for how long to wait before changing wind.
 
Hold Noise HoldNoise <integer> Noise added to how long to wait before changing wind.
 
 
INPUTS
 
Kill Removes this entity from the world.
 
KillHierarchy Removes this entity and all its children from the world.
 
AddOutput <string> Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
 
FireUser1 Causes this entity's OnUser1 output to be fired.
 
FireUser2 Causes this entity's OnUser2 output to be fired.
 
FireUser3 Causes this entity's OnUser3 output to be fired.
 
FireUser4 Causes this entity's OnUser4 output to be fired.
 
SetParent <string> Changes the entity's parent in the movement hierarchy.
 
SetParentAttachment <string> Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
 
ClearParent Removes this entity from the the movement hierarchy, leaving it free to move independently.
 
Enable Enable this entity.
 
Disable Disable this entity.
 
Kill Removes this entity from the world.
 
KillHierarchy Removes this entity and all its children from the world.
 
AddOutput <string> Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
 
FireUser1 Causes this entity's OnUser1 output to be fired.
 
FireUser2 Causes this entity's OnUser2 output to be fired.
 
FireUser3 Causes this entity's OnUser3 output to be fired.
 
FireUser4 Causes this entity's OnUser4 output to be fired.
 
SetParent <string> Changes the entity's parent in the movement hierarchy.
 
SetParentAttachment <string> Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
 
ClearParent Removes this entity from the the movement hierarchy, leaving it free to move independently.
 
Enable Enable this entity.
 
Disable Disable this entity.
 
Toggle Toggles this trigger between enabled and disabled states.
 
SetSpeed <integer> Set the baseline for how hard the wind blows.
 
 
OUTPUTS
 
OnUser1 Fired in response to FireUser1 input.
 
OnUser2 Fired in response to FireUser2 input.
 
OnUser3 Fired in response to FireUser3 input.
 
OnUser4 Fired in response to FireUser4 input.
 
OnUser1 Fired in response to FireUser1 input.
 
OnUser2 Fired in response to FireUser2 input.
 
OnUser3 Fired in response to FireUser3 input.
 
OnUser4 Fired in response to FireUser4 input.
 
OnStartTouch Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire.
 
OnEndTouch Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire.
 
OnEndTouchAll Fires when an entity stops touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.

Revision as of 13:25, 7 October 2005

Template:Wrongtitle

Entity Description

A trigger volume that pushes physics objects that touch it.

Availability

Template:In game Template:Game-base Template:In code

Keyvalues

<integer> The baseline for how hard the wind blows.
  • SpeedNoise
<integer> Amount of random noise (fluctuation, not sound) added to wind speed.
  • DirectionNoise
<integer> Amount of noise (fluctuation, not sound) added to wind direction.
  • HoldTime
<integer> Baseline for how long to wait before changing wind.
  • HoldNoise
<integer> Amount of random noise (fluctuation, not sound) added to HoldTime.

Flags

  • {| class="mw-collapsible mw-collapsed" style="background:initial;float:no;margin-bottom:1em;margin-left:0;padding-right:0.5em;border:1px solid rgba(255,255,255,0.1); border-left:solid 1px #8bb9e0; padding-left:1em;"

|+ style="text-align:left; white-space:nowrap; font-weight:bold; color:#ddd; " | BaseTrigger |

Everything (not including physics debris) : [64]
Clients (Survivors, Special Infected, Tanks Left 4 Dead seriesLeft 4 Dead series) : [1]
Only clients in vehicles : [32]
Only clients *not* in vehicles : [512]
Disallow Bots (removed since Left 4 Dead) : [4096]
NPCs (Common Infected, Witches Left 4 Dead seriesLeft 4 Dead series) : [2]
Only player ally NPCs : [16]
Only NPCs in vehicles (respects player ally flag) : [2048]
Physics Objects (not including physics debris) : [8]
Physics debris (include also physics debris) : [1024]
Pushables (Passes entities with classname func_pushable) : [4] Obsolete
Deprecated.
Equivalent to using Everything + filter_activator_class that filters func_pushable.

|}

Inputs

  • {| class="mw-collapsible mw-collapsed" style="background:initial;float:no;margin-bottom:1em;margin-left:0;padding-right:0.5em;border:1px solid rgba(255,255,255,0.1); border-left:solid 1px #8bb9e0; padding-left:1em;"

|+ style="text-align:left; white-space:nowrap; font-weight:bold; color:#ddd; " | BaseTrigger |

Toggle
Toggles this trigger between enabled and disabled states.
Enable
Enable trigger
Disable
Disable trigger
TouchTest  (in all games since Source 2007)
Triggers either the OnTouching or OnNotTouching outputs for whether anything is touching this entity.
Icon-Bug.pngBug:Sleeping prop_physics will never fire "OnTouching". Also applies to entities using prop_physics as base.  (tested in: Half-Life 2)
StartTouch  (in all games since Source 2007) !FGD
Behave as if the !caller entity had just entered the trigger volume. Accepts non-physical entities.
EndTouch  (in all games since Source 2007) !FGD
Behave as if !caller had just exited the trigger volume.
DisableAndEndTouch  (only in Source 2013 MultiplayerTeam Fortress 2 branch)
Disables this trigger and calls EndTouch on all currently-touching entities.

|}

  • SetSpeed <integer>
Set the baseline for how hard the wind blows.

Outputs

  • {| class="mw-collapsible mw-collapsed" style="background:initial;float:no;margin-bottom:1em;margin-left:0;padding-right:0.5em;border:1px solid rgba(255,255,255,0.1); border-left:solid 1px #8bb9e0; padding-left:1em;"

|+ style="text-align:left; white-space:nowrap; font-weight:bold; color:#ddd; " | BaseTrigger |

OnStartTouch
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity starts touching this trigger.
OnStartTouchAll
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity starts touching this trigger, and no other entities are touching it. If there are any other entities touching the trigger when a new one begins to touch, only OnStartTouch will fire.
OnEndTouch
!activator = entity that caused this output
!caller = this entity
Fired when a valid entity stops touching this trigger.
Note.pngNote:Will also fire for entities touching it when trigger is disabled via Disable input
Warning.pngWarning:This includes entities which are deleted while inside the trigger. In this case !activator will be invalid.
Warning.pngWarning:OnEndTouch can fire before OnStartTouch under certain circumstances[How?] where both are fired on the same tick and each have the same delay.
Note.pngFix:Add a slight delay to OnEndTouch.
OnEndTouchAll
!activator = entity that caused this output
!caller = this entity
Fired when all valid entities stop touching this trigger.
OnTouching  (in all games since Source 2007)
!activator = !caller = this entity
Fired if something is currently touching this trigger when TouchTest is fired.
OnNotTouching  (in all games since Source 2007)
!activator = !caller = this entity
Fired if nothing is currently touching this trigger when TouchTest is fired.

|}

See also