Env wind: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (client side bug)
(Grammar + KV intns.)
Line 5: Line 5:
{{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 that have {{ent|$treeSway}}, this entity is required in order for the materials to simulate wind blowing on them. <code>$treesway</code> does not require <code>env_wind</code> if <code>$treeswaystatic</code> ({{tf2}}{{GMOD}} only) is used.}}
{{note|In most games that have {{ent|$treeSway}}, this entity is required in order for the materials to simulate wind blowing on them. <code>$treesway</code> does not require <code>env_wind</code> if <code>$treeswaystatic</code> ({{tf2}}{{GMOD}} only) is used.}}
{{bug|Wind effect in client game will not stop when loading next map which not include env_wind entity at all}}
{{bug|The wind effect in the client game will not change when a new map is loaded which does not contain an env_wind entity.}}
{{code class|CEnvWind|effects.cpp}}
{{code class|CEnvWind|effects.cpp}}


Line 11: Line 11:


==Keyvalues==
==Keyvalues==
{{KV|Min normal speed (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 (maxwind)|integer|Maximum speed of the wind while idling.}}
{{KV|Max normal speed|intn=maxwind|integer|Maximum speed of the wind while idling.}}
{{KV|Min gust speed (mingust)|integer|Minimum speed of wind gusts.}}
{{KV|Min gust speed|intn=mingust|integer|Minimum speed of wind gusts.}}
{{KV|Max gust speed (maxgust)|integer|Maximum speed of wind gusts.}}
{{KV|Max gust speed|intn=maxgust|integer|Maximum speed of wind gusts.}}
{{KV|Min gust delay (mingustdelay)|integer|Minimum time delay between random gusts.}}
{{KV|Min gust delay|intn=mingustdelay|integer|Minimum time delay between random gusts.}}
{{KV|Max gust delay (maxgustdelay)|integer|Maximum time delay between random gusts.}}
{{KV|Max gust delay|intn=maxgustdelay|integer|Maximum time delay between random gusts.}}
{{KV|Gust Duration (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) (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 (windradius)|float|only=L4ds|The radius this entity applies wind effects to. -1 for global effect.}}
{{KV|Radius|intn=windradius|float|only=L4ds|The radius this entity applies wind effects to. -1 for global effect.}}
{{KV BaseEntity}}
{{KV BaseEntity}}



Revision as of 22:38, 20 December 2021

English (en)Translate (Translate)

Template:Base point It creates wind throughout an entire map.

Icon-Important.pngImportant:This is a preserved entity in Counter-Strike: SourceHalf-Life 2: DeathmatchDay of Defeat: SourceTeam Fortress 2Left 4 DeadLeft 4 Dead 2Portal 2Counter-Strike: Global Offensive.
If the game has round restart mechanics this entity may not behave as expected:
More info
  • On a new round entities with this classname will intentionally not reset. You can use logic_auto to emulate resetting it.
  • Killing it removes it forever, as it is not respawned on a new round.
  • It cannot be spawned with a point_template.
  • Parenting this with non-preserved entities may have undesirable effects.
Note.pngNote:Wind direction is determined by env_wind's yaw value.
Note.pngNote:In most games that have $treeSway, this entity is required in order for the materials to simulate wind blowing on them. $treesway does not require env_wind if $treeswaystatic (Team Fortress 2Garry's Mod only) is used.
Icon-Bug.pngBug:The wind effect in the client game will not change when a new map is loaded which does not contain an env_wind entity.  [todo tested in ?]
C++ In code, it is represented by theCEnvWindclass, defined in theeffects.cppfile.

Keyvalues

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 Left 4 Dead seriesLeft 4 Dead series)
The radius this entity applies wind effects to. -1 for global effect.


Inputs

SetWindDir <integerRedirectInput/integer> (only in Garry's Mod) !FGD
Set the wind's direction to this.
Enable  (only in Portal 2: Community Edition)
Turns the wind on
Disable  (only in Portal 2: Community Edition)
Turns the wind off


Outputs

OnGustStart
Fired when a wind gust begins.
OnGustEnd
Fired when a wind gust ends.


See Also