BIS fnc getParamValue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Added see also)
(description format)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
|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".  |= Description
____________________________________________________________________________________________


Description:
| paramClass call [[BIS_fnc_getParamValue]]; |= Syntax
Return value of mission param defined in Description.ext


Parameter(s):
|p1= paramClass: [[String]] - class name of one of [[Arma 3 Mission Parameters]]|= Parameter 1
0: STRING - param class
1 (Optional): NUMBER - default value used when the param is not found


Returns:
|[[Number]] - param value. Default: 0|= Return value
NUMBER
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|s2= [paramClass, defaultValue] call [[BIS_fnc_getParamValue]]; |= Syntax
|p21= paramClass: [[String]] - class name of one of [[Arma 3 Mission Parameters]]|= Parameter 21
|p22= defaultValue (Optional): [[Number]] - default value to return if param doesn't exist|= Parameter 22
 
|r2=[[Number]] - param value. Default: 0 |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_getParamValue]]; --> |= Syntax
|x1= <code>_viewDistance = "ViewDistance" [[call]] [[BIS_fnc_getParamValue]];</code> |=  
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________


|x1= <code>_viewDistance = "ViewDistance" call BIS_fnc_getParamValue;</code> |=  
|x2= <code>_viewDistance = ["ViewDistance", 2] [[call]] [[BIS_fnc_getParamValue]];</code> |=  
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Arma 3 Mission Parameters]] |= SEEALSO  
| [[Arma 3 Mission Parameters]], [[paramsArray]] |= SEEALSO  
}}
}}



Revision as of 02:01, 7 February 2017


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:
Uncategorised

Syntax

Syntax:
paramClass call BIS_fnc_getParamValue;
Parameters:
paramClass: String - class name of one of Arma 3 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 Arma 3 Mission Parameters
defaultValue (Optional): Number - default value to return if param doesn't exist
Return Value:
Number - param value. Default: 0

Examples

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

Additional Information

See also:
Arma 3 Mission ParametersparamsArray

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

Notes

Bottom Section