Arma 3 Scripting

Command in Environment

fogParams

Also available as Markdown and JSON, or read the original wiki page.

Description

A getter for setFog (Alt Syntax). Returns extended params for the fog

Syntax

fogParams

Returns: Array of Numbers - in setFog format: [fogValue, fogDecay, fogBase]

Examples

Example 1

private _fog = fogParams;

See also

setFog · fog · fogForecast · rainParams

Community notes

POLPOX

To return a position (ASL Height)'s approx. fog level

private _getFogPowerASL = {
    fogParams params ["_fogPower","_fogDecay","_fogHeight"] ;
    private _height = _this - _fogHeight;
    (_fogPower * 0.5 ^ (_height * _fogDecay / 2.45) max 0)
};

(AGLToASL (positionCameraToWorld [0,0,0]) # 2) call _getFogPowerASL;

Note that, this could return >1 value if fogDecay is not 0.