fogParams: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (categories)
m (Some wiki formatting)
 
(31 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.00


|1.00|= Game version
|gr1= Environment
____________________________________________________________________________________________


| Returns actual params for fog.
|descr= A getter for [[setFog]] (Alt Syntax). Returns extended params for the fog


You can use this command in combination with [[setFog_array]] to sync server fog with clients. |= Description
|s1= [[fogParams]]
____________________________________________________________________________________________


| '''fogParams''' |= Syntax
|r1= [[Array]] of [[Number]]s - in [[setFog]] format: [fogValue, fogDecay, fogBase]


| [[Array]] - [fogValue, fogDecay, fogBase] |= RETURNVALUE
|x1= <sqf>private _fog = fogParams;</sqf>


|seealso= [[setFog]] [[fog]] [[fogForecast]] [[rainParams]]
}}


|x1= <code>//server
{{Note
server_fog = [[fogParams]];
|user= POLPOX
[[publicVariable]] "server_fog";
|timestamp= 20230923065153
//client
|text= To return a position (ASL Height)'s approx. fog level
0 [[setFog_array|setFog]] server_fog;</code> |= EXAMPLE1
<sqf>
 
private _getFogPowerASL = {
____________________________________________________________________________________________
fogParams params ["_fogPower","_fogDecay","_fogHeight"] ;
 
private _height = _this - _fogHeight;
| [[setFog_array]], [[setFog]], [[fog]], [[fogForecast]] |= SEEALSO
(_fogPower * 0.5 ^ (_height * _fogDecay / 2.45) max 0)
};


|  |= MPBEHAVIOUR
(AGLToASL (positionCameraToWorld [0,0,0]) # 2) call _getFogPowerASL;
____________________________________________________________________________________________
</sqf>
Note that, this could return >1 value if fogDecay is not 0.
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Environment|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12:39, 12 March 2024

Hover & click on the images for description

Description

Description:
A getter for setFog (Alt Syntax). Returns extended params for the fog
Groups:
Environment

Syntax

Syntax:
fogParams
Return Value:
Array of Numbers - in setFog format: [fogValue, fogDecay, fogBase]

Examples

Example 1:
private _fog = fogParams;

Additional Information

See also:
setFog fog fogForecast rainParams

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
POLPOX - c
Posted on Sep 23, 2023 - 06:51 (UTC)
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.