Env wind: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 
 

 Note:Wind direction is determined by
Note:Wind direction is determined by 
 Note:In most games, this entity is required for $treesway to have any effect, unless
Note:In most games, this entity is required for $treesway to have any effect, unless 


 ) is used.
) is used.
 Bug:The wind effect in the client game will not reset when a new map is loaded which does not contain an env_wind entity.  [todo tested in ?]
Bug:The wind effect in the client game will not reset when a new map is loaded which does not contain an env_wind entity.  [todo tested in ?]
 Tip:In
Tip:In  Black Mesa this entity can be spawned via point_template and killed with
 Black Mesa this entity can be spawned via point_template and killed with 
		
	
| Thunder4ik (talk | contribs) m (→top: Unicodifying, replaced: {{language subpage → {{langsp) |  (Added that wind radius is also in Garry's Mod, changed SetWindDir description to FGD description.) | ||
| (10 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
| {{LanguageBar}} | |||
| {{this is a|name=env_wind | {{Preserved entity}} | ||
| {{CD|CEnvWind|file1=effects.cpp}} | |||
| {{this is a|point entity|name=env_wind|sprite=1}} It creates wind throughout an entire map, which affect [[prop_physics|physics props]], [[$treesway|swaying trees]], and [[func_dustmotes|dust]]. | |||
| {{note|Wind direction is determined by <code>env_wind</code>'s yaw value.}} | {{note|Wind direction is determined by <code>env_wind</code>'s yaw value.}} | ||
| {{note|In most games  | {{note|In most games, this entity is required for {{ent|$treesway}} to have any effect, unless {{code|$treeswaystatic}} {{only|{{tf2branch}}{{GMOD}}{{csgo}}{{mapbase}}}} is used.}} | ||
| {{bug|The wind effect in the client game will not  | {{bug|The wind effect in the client game will not reset when a new map is loaded which does not contain an env_wind entity.}} | ||
| {{tip|In {{bms|4}} this entity can be spawned via {{ent|point_template}} and killed with {{code|Kill}} input. This allows you to change the wind globally or turn it off completely by spawning new {{ent|env_wind}} and killing via {{code|Kill}} input the previous {{ent|env_wind}}.}} | |||
| {{clr}} | {{clr}} | ||
| __NOTOC__ | |||
| ==Keyvalues== | == Keyvalues == | ||
| {{KV Targetname}} | |||
| {{KV|Min normal speed|intn=minwind|integer|Minimum speed of the wind while idling.}} | {{KV|Min normal speed|intn=minwind|integer|Minimum speed of the wind while idling.}} | ||
| {{KV|Max normal speed|intn=maxwind|integer|Maximum speed of the wind while idling.}} | {{KV|Max normal speed|intn=maxwind|integer|Maximum speed of the wind while idling.}} | ||
| Line 18: | Line 21: | ||
| {{KV|Gust Duration|intn=gustduration|integer|How long will the wind gust for.}} | {{KV|Gust Duration|intn=gustduration|integer|How long will the wind gust for.}} | ||
| {{KV|Max gust dir change (degrees)|intn=gustdirchange|integer|Maximum amount that the wind's direction changes due to a gust.}} | {{KV|Max gust dir change (degrees)|intn=gustdirchange|integer|Maximum amount that the wind's direction changes due to a gust.}} | ||
| {{KV|Radius|intn=windradius|float|only=L4ds|The radius this entity applies wind effects to. -1 for global effect. | {{KV|Radius|intn=windradius|float|only={{L4ds}}{{GMOD}}|The radius this entity applies wind effects to. -1 for global effect.}} | ||
| ==Inputs== | == Inputs == | ||
| {{ | {{I|SetWindDir|Set the wind direction. (Yaw only)|param=int|only=GMOD}} | ||
| {{ | {{I|Enable|Turns the wind on.|only={{P2CE}}}} | ||
| {{ | {{I|Disable|Turns the wind off.|only={{P2CE}}}} | ||
| ==Outputs== | == Outputs == | ||
| {{ | {{O|OnGustStart|activator=!caller = NULL|caller=hide|Fired when a wind gust begins.   | ||
| {{ | :{{Bug|env_wind gusts can seemingly pile up and fire this output multiple times when a player first loads into a multiplayer map.  {{Workaround|Use AddOutput to add OnGustStart effects when players are already connected}}{{Todo|Needs more testing, only observed in {{tf2}} }}}}}} | ||
| {{O|OnGustEnd|activator=!caller = NULL|caller=hide|Fired when a wind gust ends.}} | |||
| ==See also== | == See also == | ||
| *{{ent|trigger_wind}} | * {{ent|trigger_wind}} | ||
| *{{ent|trigger_push}} | * {{ent|trigger_push}} | ||
| *{{ent|env_rotorwash}} | * {{ent|env_rotorwash}} | ||
Latest revision as of 23:13, 26 September 2025

 

This is a preserved entity in 







If the game has round restart mechanics this entity may not behave as expected.








If the game has round restart mechanics this entity may not behave as expected.
|  Class hierarchy | 
|---|
| CEnvWind | 
|  effects.cpp | 

env_wind  is a   point entity  available in all  Source games. It creates wind throughout an entire map, which affect physics props, swaying trees, and dust.
 Source games. It creates wind throughout an entire map, which affect physics props, swaying trees, and dust.
 Note:Wind direction is determined by
Note:Wind direction is determined by env_wind's yaw value. Note:In most games, this entity is required for $treesway to have any effect, unless
Note:In most games, this entity is required for $treesway to have any effect, unless $treeswaystatic (only in 


 ) is used.
) is used. Bug:The wind effect in the client game will not reset when a new map is loaded which does not contain an env_wind entity.  [todo tested in ?]
Bug:The wind effect in the client game will not reset when a new map is loaded which does not contain an env_wind entity.  [todo tested in ?] Tip:In
Tip:In  Black Mesa this entity can be spawned via point_template and killed with
 Black Mesa this entity can be spawned via point_template and killed with Kill input. This allows you to change the wind globally or turn it off completely by spawning new env_wind and killing via Kill input the previous env_wind.Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Min normal speed (minwind) <integer>
- Minimum speed of the wind while idling.
- Max normal speed (maxwind) <integer>
- Maximum speed of the wind while idling.
- Min gust speed (mingust) <integer>
- Minimum speed of wind gusts.
- Max gust speed (maxgust) <integer>
- Maximum speed of wind gusts.
- Min gust delay (mingustdelay) <integer>
- Minimum time delay between random gusts.
- Max gust delay (maxgustdelay) <integer>
- Maximum time delay between random gusts.
- Gust Duration (gustduration) <integer>
- How long will the wind gust for.
- Max gust dir change (degrees) (gustdirchange) <integer>
- Maximum amount that the wind's direction changes due to a gust.
- Radius (windradius)  <float> (only in    ) )
- The radius this entity applies wind effects to. -1 for global effect.
Inputs
- SetWindDir  <integer> (only in  ) )
- Set the wind direction. (Yaw only)
Outputs
- OnGustStart
- !activator = !caller = NULL
 Fired when a wind gust begins.
 Bug:env_wind gusts can seemingly pile up and fire this output multiple times when a player first loads into a multiplayer map.  [todo tested in ?] Bug:env_wind gusts can seemingly pile up and fire this output multiple times when a player first loads into a multiplayer map.  [todo tested in ?] Workaround:Use AddOutput to add OnGustStart effects when players are already connected Workaround:Use AddOutput to add OnGustStart effects when players are already connected
- OnGustEnd
- !activator = !caller = NULL
 Fired when a wind gust ends.

























