{"name":"fogParams","operator":null,"title":"fogParams","type":"command","url":"https://community.bistudio.com/wiki/fogParams","revid":353028,"updated":"2024-03-12T11:39:48Z","groups":["Environment"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"A getter for setFog (Alt Syntax). Returns extended params for the fog","syntaxes":[{"syntax":"fogParams","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Array of Numbers","types":["Array","Number"],"description":"in setFog format: [fogValue, fogDecay, fogBase]","text":"Array of Numbers - in setFog format: [fogValue, fogDecay, fogBase]"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\nprivate _fog = fogParams;\n```","code":["private _fog = fogParams;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setFog","fog","fogForecast","rainParams"],"notes":[{"user":"POLPOX","date":"2023-09-23T06:51:53Z","text":"To return a position (ASL Height)'s approx. fog level\n\n```sqf\nprivate _getFogPowerASL = {\n    fogParams params [\"_fogPower\",\"_fogDecay\",\"_fogHeight\"] ;\n    private _height = _this - _fogHeight;\n    (_fogPower * 0.5 ^ (_height * _fogDecay / 2.45) max 0)\n};\n\n(AGLToASL (positionCameraToWorld [0,0,0]) # 2) call _getFogPowerASL;\n```\n\nNote that, this could return >1 value if fogDecay is not 0."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Environment","Introduced with Arma 3 version 1.00","Scripting Commands"]}