Func precipitation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 32: Line 32:
| 1 || Snow '''(Identical to "Rain" - use "Snowfall" instead.)'''
| 1 || Snow '''(Identical to "Rain" - use "Snowfall" instead.)'''
|-
|-
| {{EP1 add|2}} || {{EP1 add|Ash}}
| {{EP1 add|2}} || {{EP1 add|Ash}} '''Note:''' This option appears to have some problems in Counter Strike: Source (missing texture/sprite)
|-
|-
| {{EP1 add|3}} || {{EP1 add|Snowfall}}
| {{EP1 add|3}} || {{EP1 add|Snowfall}}

Revision as of 16:34, 26 March 2011

Template:Wrongtitle Template:Base brush

Entity Description

A brush entity that creates rain and snow inside its volume.

Rain Related Console Commands

There are a number of console commands that control func_precipitation rendering. These include: r_rainalpha, r_rainalphapow, r_raindensity, r_rainlength, r_RainHack, r_rainlength, r_RainProfile (displays stats on rain rendering costs), r_RainRadius, r_RainSideVel (controls sideways movement of the rain particles, e.g. to simulate rain in the wind), r_RainSimulate (toggles animation on the rain; freezes the rain when set to 0), r_rainspeed, r_RainSplashPercentage and r_rainwidth.

Todo: The names of these seem descriptive enough for most of them, but what do r_rainalphapow and r_RainHack do?
  • See also Precipitation issues - details various issues and workarounds involving the use of this entity.

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

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
  • renderamt
<integer> Density (0-100%)
  • rendercolor
#000000 Color (R G B)
  • preciptype
<choices> Precipitation Type
Literal Value Description
0 Rain
1 Snow (Identical to "Rain" - use "Snowfall" instead.)
(in all games since Half-Life 2: Episode One) Ash (in all games since Half-Life 2: Episode One) Note: This option appears to have some problems in Counter Strike: Source (missing texture/sprite)
(in all games since Half-Life 2: Episode One) Snowfall (in all games since Half-Life 2: Episode One)
4 -
Template:L4D add Template:L4D add
Template:L4D2 add Template:L4D2 add

Inputs

Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Outputs