Func water analog: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:


Only two [[material]]s are known to render correctly across all systems, these are <code>nature/water_movingplane</code> and <code>nature/water_dx70</code>. This is ostensibly because of how the material effects on the more complex water [[shader]]s require static brushes, so they can optimize what's visible to the water surface. A moving water surface would break this effect, so therefore full water shaders are unusable on a moving surface.
Only two [[material]]s are known to render correctly across all systems, these are <code>nature/water_movingplane</code> and <code>nature/water_dx70</code>. This is ostensibly because of how the material effects on the more complex water [[shader]]s require static brushes, so they can optimize what's visible to the water surface. A moving water surface would break this effect, so therefore full water shaders are unusable on a moving surface.
{{bug|Doesn't behave properly in {{l4d2}}! Physics don't behave properly if affected by this brush and graphical glitches can occur. Use sparingly and cautiously!}}


== Keyvalues ==
== Keyvalues ==
Line 13: Line 15:
{{KV|Sound played when the water brush starts moving.|sound}}
{{KV|Sound played when the water brush starts moving.|sound}}
{{KV|Sound played when the water brush stops moving.|sound}}
{{KV|Sound played when the water brush stops moving.|sound}}
{{KV|Wave Height|string}}
{{KV|Wave Height|string|Seemingly deprecated. Does nothing in {{l4d2}}... Maybe works in {{hl2}}???}}
{{KV Targetname}}
{{KV Targetname}}
{{KV Parentname}}
{{KV Parentname}}

Revision as of 19:34, 22 January 2018

Template:Base brush

Entity description

It moves linearly along a given distance, in a given direction.

Only two materials are known to render correctly across all systems, these are nature/water_movingplane and nature/water_dx70. This is ostensibly because of how the material effects on the more complex water shaders require static brushes, so they can optimize what's visible to the water surface. A moving water surface would break this effect, so therefore full water shaders are unusable on a moving surface.

Icon-Bug.pngBug:Doesn't behave properly in Left 4 Dead 2! Physics don't behave properly if affected by this brush and graphical glitches can occur. Use sparingly and cautiously!  [todo tested in ?]

Keyvalues

Move Direction (Pitch Yaw Roll) ([todo internal name (i)]) <angle>
The direction the water will move, when told to 'Open'.
Start Position ([todo internal name (i)]) <float>
Position of the water brush when spawned. The range is a value between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).
Speed ([todo internal name (i)]) <integer>
The speed that the water brush moves, in inches per second.
Move Distance ([todo internal name (i)]) <float>
The distance from the starting point that the water brush should move, in inches.
Sound played when the water brush starts moving. ([todo internal name (i)]) <sound>
Sound played when the water brush stops moving. ([todo internal name (i)]) <sound>
Wave Height ([todo internal name (i)]) <string>
Seemingly deprecated. Does nothing in Left 4 Dead 2... Maybe works in Half-Life 2???
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.

Origin:

Origin (X Y Z) (origin) <origin>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.

Inputs

Open
Move the water brush to the end position (starting position + (move direction * move distance)).
Close
Move the water brush to the starting position.
SetPosition <stringRedirectInput/string>
Move the water brush to a specific position between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).


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

OnFullyOpen
Fired when the water brush reaches the end position (starting position + (move direction * move distance)).
OnFullyClosed
Fired when the water brush reaches the starting position.


See also

Tutorials about Func_Water_Analog (Russian)

Lessons created by Project-S