This article's documentation is for the "GoldSrc" 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
CBaseAnimating
CBaseDelay
CBaseEntity
doors.cpp

func_water is a brush entity available in all GoldSrc GoldSrc games. A water texture (one prefixed with '!') will act as water (with additional prefixes for other liquid types), but binding it to an entity gives added advantages, namely the ability to move and be translucent.

Note that !-prefixed textures will only appear on the top face of the entity, unlike world brushes.

Cpp.pngCode:Both func_water and func_door are linked to CBaseDoor C++ class, and can be used interchangeably, setting skin to the appropriate contents. The only difference is when this entity collides with another entity with the same targetname: if the other entity is a "func_door" or "func_door_rotating", then this entity will stop when it hits the other entity.

Notable keyvalues

Wave Height (WaveHeight) <float>
Height of waves on any !-prefixed textures on this entity. Default value is 3.2.
Contents (skin) <choices>
What brush contents to use for this entity.
For entities with no clipnodes (such as using zhlt_noclip), this is purely cosmetic. For other entities, this requires the entity collision to be set to SOLID_NOT for non-cosmetic effect (applied automatically on doors and func_illusionary).
Contents types
-1: Empty
-2: Solid
-3: Water (also disables backface culling)
-4: Slime (like water, but inflicts damage)
-5: Lava (like slime, but inflicts double damage)
-6: Sky
-7: Volumetric Light (same as water)
-8: ???
Confirm:This is CONTENTS_CLIP, but BSP compilers change it to solid, so it probably has no effect at runtime.
-9: Water with 0° current
-10: Water with 90° current
-11: Water with 180° current
-12: Water with 270° current
-13: Water with upward current
-14: Water with downward current
-15: Translucent (like water, but never solid)
-16: Ladder
-17: Zero Gravity
-18: Hover Field
-19: Fog
Note.pngNote:All Keyvalues and Spawnflags are the same as func_door.