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

func_water

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
edit
Class hierarchy
CBaseDoor
CBaseToggle
CBaseEntity
doors.cpp
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.
Obsolete-notext.png
This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
It has since been deprecated by: func_water_analog. Non-moving water brushes should be part of worldspawn.

func_water is a semi-internal brush entity available in all Source Source games. An entity-based water brush, being assigned water contents by VBSP. A legacy entity from the GoldSrc GoldSrc engine, deprecated by func_water_analog. It is still used in some Half-Life: Source Half-Life: Source maps.

Icon-Important.pngImportant:Does not work with the Water shader.
Refract can be used as a workaround for dynamic refraction with cubemapped reflections, although Valve does not provide any materials which do this.
Existing materials which are compatible include:
Confirm:Does the Water shader work if using cubemap reflections and refractions, instead of the real-time versions? This would still be beneficial for the ability to have two normal maps scrolling in different directions.
Icon-Bug.pngBug:Water must be part of the world in Left 4 Dead seriesLeft 4 Dead series otherwise it doesn't work properly and acts as non-solid brush.
Cpp.pngCode:Both func_water and func_door are linked to CBaseDoor C++ class. The game code checks the classname KV to distinguish between them, applying specific behaviors if the classname is "func_water". As such, using AddOutput to change the classname of a func_water may have unexpected effects.

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

Note.pngNote:All Keyvalues / Inputs / Outputs are same as func_door.

FGD Code

While func_water exists in base.fgd, it is commented out. It can either be uncommented, or this simpler FGD entry can be added anywhere after the func_door entry.

@SolidClass base(func_door) = func_water : "A water brush entity that moves linearly along a given distance, in a given direction." []

See also