BIS fnc getParamValue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - "[[Arma 3: Mission Parameters" to "[[Mission Parameters")
 
(46 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Mission Parameters


|1.00|= Game version
|descr=Returns the value of mission param given by the class name. This function is global and will return selected param value on any PC including JIP. For backward compatibility it also supports "param1" and "param2".
____________________________________________________________________________________________


| <pre>/*
|s1= paramClass call [[BIS_fnc_getParamValue]]


Description:
|p1= paramClass: [[String]] - class name of one of [[Mission Parameters]]
Return value of mission param defined in Description.ext


Parameter(s):
|r1= [[Number]] - param value. Default: 0
0: STRING - param class
1 (Optional): NUMBER - default value used when the param is not found


Returns:
|s2=  [paramClass, defaultValue] call [[BIS_fnc_getParamValue]]
NUMBER
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p21= paramClass: [[String]] - class name of one of [[Mission Parameters]]
____________________________________________________________________________________________
|p22= defaultValue (Optional): [[Number]] - default value to return if param doesn't exist


| <!-- [] call [[BIS_fnc_getParamValue]]; --> |= Syntax
|r2=[[Number]] - param value. Default: 0


|p1= |= Parameter 1
|x1= <sqf>private _viewDistance = "ViewDistance" call BIS_fnc_getParamValue;</sqf>


| |= Return value
|x2= <sqf>private _viewDistance = ["ViewDistance", 2] call BIS_fnc_getParamValue;</sqf>
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[Mission Parameters]] [[getMissionConfigValue]] [[getMissionConfig]] [[BIS_fnc_storeParamsValues]]
}}
}}
<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:Function Group: Params|{{uc:getParamValue}}]]
[[Category:Functions|{{uc:getParamValue}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:getParamValue}}]]

Latest revision as of 17:42, 12 February 2024

Hover & click on the images for description

Description

Description:
Returns the value of mission param given by the class name. This function is global and will return selected param value on any PC including JIP. For backward compatibility it also supports "param1" and "param2".
Execution:
call
Groups:
Mission Parameters

Syntax

Syntax:
paramClass call BIS_fnc_getParamValue
Parameters:
paramClass: String - class name of one of Mission Parameters
Return Value:
Number - param value. Default: 0

Alternative Syntax

Syntax:
[paramClass, defaultValue] call BIS_fnc_getParamValue
Parameters:
paramClass: String - class name of one of Mission Parameters
defaultValue (Optional): Number - default value to return if param doesn't exist
Return Value:
Number - param value. Default: 0

Examples

Example 1:
private _viewDistance = "ViewDistance" call BIS_fnc_getParamValue;
Example 2:
private _viewDistance = ["ViewDistance", 2] call BIS_fnc_getParamValue;

Additional Information

See also:
Mission Parameters getMissionConfigValue getMissionConfig BIS_fnc_storeParamsValues

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