env_fog

Modified

12-Jul-2023

Entity which creates a fog effect within a specific area around it. Fog, unfortunately, will only show to players who have it enabled in their options.

Keyvalues


OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.

Name targetname : Set name of env_fog so other entities can trigger it to control fog. Depending on trigger use-type: 'On'- enable fog, 'Off'- disable fog, 'Toggle'- toggle fog. Can be kill-targeted which removes fog effect as well.

Fog Color (RGB) rendercolor : The color of the fog.

Start Distance iuser2 : Distance, in units, at which the fog starts to be visible. This needs to be greater than zero.

End Distance iuser3 : Distance, in units, at which the fog appears opaque. This needs to be greater than the start distance.

Flags


  • 1 : Start Off : The env_fog entity will start disabled and needs to be triggered in order for fog to show.

Fog works only for OpenGL graphics mode.

Entities with 'Render mode' set to other than 'Normal' (including sprites) are not affected by env_fog.