This article's documentation is for anything that uses the Source engine. Click here for more information.

Trigger wind: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
 
(26 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{wrongtitle|title=trigger_wind}}
__NOTOC__{{CD|CTriggerWind|file1=triggers.cpp}}
{{base_brush}}
{{this is a|brush entity|name=trigger_wind}} It is a [[Triggers|trigger]] that pushes [[physics]] objects that touch its volume.
{{warning|[[Sv pushaway clientside size|Clientside]] {{ent|prop_physics}} aren't detected by this entity. Use Force server-side flag of such <kbd>prop_physics</kbd> if this is an issue.}}


==Entity Description==
== Keyvalues ==
A trigger volume that pushes physics objects that touch it.
{{KV Targetname}}
* See also [[env_wind]] and [[env_rotorwash]]
{{KV|Speed|intn=speed|integer|The baseline for how hard the wind blows.}}
{{KV|Speed Noise|intn=SpeedNoise|integer|Noise added to wind speed +/-}}
{{KV|Pitch Yaw Roll (Y Z X)|intn=angles|angles|Yaw sets the wind direction. Pitch and roll should be ignored.
{{warning|Brush also gets rotated but it's not shown in hammer}}}}
{{workaround|If [[vscript|Vscripts]] with NetProps functions are available then instead of using angles keyvalue create logic_auto that '''OnMapSpawn''' sends '''RunScriptCode''' input to trigger_wind with parameter. (45 yaw in this example)
<source lang=c>foreach(k,v in {m_nDirBase=45}) NetProps.SetPropInt(self,k,v)</source>}}
{{KV|Direction Noise|intn=DirectionNoise|integer|Noise added to wind direction.}}
{{KV|Hold Time|integer|intn=HoldTime|Baseline for how long to wait before changing wind.}}
{{KV|Hold Noise|integer|intn=HoldNoise|Noise added to how long to wait before changing wind.}}
{{KV|Filter Name|intn=filtername|filter|Name of filter entity to test against activators.}}
{{KV EnableDisable}}


== Flags ==
Needs one of these flags checked to work.


{{in code|class=class_c_trigger_wind.html CTriggerWind|file=triggers_8cpp-source.html triggers.cpp}}
{{Fl|8|Physics Objects}}
{{Fl|64|Everything (not including physics debris)}}


==Keyvalues==
== Inputs ==
*{{kv trigger}}
{{I|SetSpeed|Set the baseline for how hard the wind blows.|param=integer}}
*{{kv angles}}
{{I EnableDisable}}
*'''Speed'''
{{Bug|tested=l4d2|Sometimes props that are inside this trigger's brush and are asleep won't be detected after '''Enable''' input.
:<float> The baseline for how hard the wind blows.
{{Fix|Send '''Wake''' input to all the desired props.}}}}
*'''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==
== See also ==
*{{fl trigger}}
* {{ent|env_wind}}
*4096 : Motion Moveable ({{not in fgd}})
* {{ent|env_rotorwash}}


{{warning|Using Motion Moveable with any other flags checked will cause immediate map load crashes.}}
{{sensor brush}}
 
==Inputs==
*{{i trigger}}
*'''SetSpeed <integer>'''
:Set the baseline for how hard the wind blows.
 
==Outputs==
*{{o trigger}}

Latest revision as of 06:03, 12 March 2025

C++ Class hierarchy
CTriggerWind
CBaseVPhysicsTrigger
CBaseEntity
C++ triggers.cpp

trigger_wind is a brush entity available in all Source Source games. It is a trigger that pushes physics objects that touch its volume.

Warning.pngWarning:Clientside prop_physics aren't detected by this entity. Use Force server-side flag of such prop_physics if this is an issue.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Speed (speed) <integer>
The baseline for how hard the wind blows.
Speed Noise (SpeedNoise) <integer>
Noise added to wind speed +/-
Pitch Yaw Roll (Y Z X) (angles) <angles>
Yaw sets the wind direction. Pitch and roll should be ignored.
Warning.pngWarning:Brush also gets rotated but it's not shown in hammer
PlacementTip.pngWorkaround:If Vscripts with NetProps functions are available then instead of using angles keyvalue create logic_auto that OnMapSpawn sends RunScriptCode input to trigger_wind with parameter. (45 yaw in this example)
foreach(k,v in {m_nDirBase=45}) NetProps.SetPropInt(self,k,v)
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.
Filter Name (filtername) <filter>
Name of filter entity to test against activators.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Flags

Needs one of these flags checked to work.


Physics Objects : [8]
Everything (not including physics debris) : [64]

Inputs

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

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.
Icon-Bug.pngBug:Sometimes props that are inside this trigger's brush and are asleep won't be detected after Enable input.
Note.pngFix:Send Wake input to all the desired props.
  (tested in: l4d2)

See also