This article's documentation is for the "GoldSrc" engine. Click here for more information.

func_water

From Valve Developer Community
Revision as of 01:34, 20 March 2025 by Nescius (talk | contribs) (the few relevant added by func_water fgd should still be listed as they are easy to miss on func_door)
Jump to navigation Jump to search
English (en)Translate (Translate)
edit
C++ Class hierarchy
CBaseDoor
CBaseToggle
CBaseAnimating
CBaseDelay
CBaseEntity
C++ 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>
  • -3: "Water"
  • -4: "Slime"
  • -5: "Lava"
Note.pngNote:All Keyvalues and Spawnflags are the same as func_door.