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

Func water (GoldSrc): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
{{TabsBar|main=Func water (Source)}}
{{TabsBar|main=Func water (Source)}}
{{CD|CBaseDoor|base=CBaseToggle|goldsrc=doors.cpp}}
{{CD|CBaseDoor|base=CBaseToggle|goldsrc=doors.cpp}}
{{this is a|brush entity|name=func_water|engine=GoldSrc}} A water texture (one prefixed with '!') will act as water (with [[texture prefixes|additional prefixes for other liquid types]]), but binding it to an entity gives added advantages.  
{{this is a|brush entity|name=func_water|engine=GoldSrc}} A water texture (one prefixed with '!') will act as water (with [[texture prefixes|additional prefixes for other liquid types]]), but binding it to an entity gives added advantages, namely the ability to move and be translucent.
{{codenote|Both <code>func_water</code> and {{ent|func_door|engine=goldsrc}} are linked to [[CBaseDoor (GoldSrc)|CBaseDoor]] C++ class, and can be used interchangeably, setting {{code|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.}}
{{codenote|Both <code>func_water</code> and {{ent|func_door|engine=goldsrc}} are linked to [[CBaseDoor (GoldSrc)|CBaseDoor]] C++ class, and can be used interchangeably, setting {{code|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.}}
{{note|All Keyvalues and Spawnflags are the same as {{ent|func_door|engine=goldsrc}}.}}
{{note|All Keyvalues and Spawnflags are the same as {{ent|func_door|engine=goldsrc}}.}}

Revision as of 12:40, 19 March 2025

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.

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.
Note.pngNote:All Keyvalues and Spawnflags are the same as func_door.