env_fog

From Valve Developer Community
Revision as of 06:20, 2 December 2025 by SirYodaJedi (talk | contribs) (why is this not in DoD? DoD grabs a bunch of ents from spirit, why not this one?)
Jump to navigation Jump to search
Edit Tabs
C++ Class hierarchy
CClientFog
CBaseEntity
C++ cbase.h
triggers.cpp

env_fog is a logical entity available in Counter-Strike 1 seriesCounter-Strike 1 seriesCounter-Strike 1 series Counter-Strike 1 series, Deathmatch Classic Deathmatch Classic, and Spirit of Half-Life Spirit of Half-Life. This entity is used to cover the map in fog. Most Counter-Strike FGDs do not come with this entity listed, it has to be manually added in the FGD to be used in Hammer.

Note.pngNote:While Day of Defeat Day of Defeat has fog, it does not have this entity; the fog is applied automatically [How?], and is disabled when the player has the minimap open.

Key values

Name (targetname) <string>
The targetname that other entities refer to this entity by, usually via the target, killtarget, and TriggerTarget KVs.
In Spirit of Half-Life, fog can be toggled by targeting it.
Fog Color (R G B) (rendercolor) <color255>
This property allows you to set the color of the fog using an "R G B" value. For example, for blue fog you could use "0 0 255".
Start distance (startdist) <integer> (only in Deathmatch ClassicSpirit of Half-Life)
This value defines how far away from the player the fog will start. At this range, the fog is completely transparent.
End distance (enddist) <integer> (only in Deathmatch ClassicSpirit of Half-Life)
This value defines how far away from the player the fog will end. At this point, the fog becomes 100% opaque.
Start distance (fogStartDistance) <integer> (only in Condition Zero Deleted Scenes)
Distance where the fog begins to appear.
Stop distance (fogStopDistance) <integer> (only in Condition Zero Deleted Scenes)
Distance where the fog ends to appear.
Fog density (density) <integer> (only in Counter-StrikeCounter-Strike: Condition Zero)
Density of the fog.
Fade in time (fadein)  (only in Spirit of Half-Life)
Fade out time (fadeout)  (only in Spirit of Half-Life)
(holdtime)  (only in Spirit of Half-Life)

Flags

Fog Affects Skybox : [1] (only in Condition Zero Deleted Scenes)[confirm]
Start On : [1] (only in Spirit of Half-Life)
If this entity has a targetname, it will start off unless this spawnflag is used.
Is Fading : [32768] (only in Spirit of Half-Life) !FGD
Handled via game code; do not set manually.