BIS fnc getParamValue: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>\[\[private\]\] (_?[a-zA-Z0-9_]+) = \[([^\[]*)\] \[\[(call|spawn)\]\] \[\[(BI(N|S)_fnc_[a-zA-Z0-9_]+)\]\];?<\/code>" to "<sqf>private $1 = [$2] $3 $4;</sqf>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
||
Line 21: | Line 21: | ||
|r2=[[Number]] - param value. Default: 0 | |r2=[[Number]] - param value. Default: 0 | ||
|x1= <code> | |x1= <code>private _viewDistance = "ViewDistance" [[call]] [[BIS_fnc_getParamValue]];</code> | ||
|x2= <sqf>private _viewDistance = ["ViewDistance", 2] call BIS_fnc_getParamValue;</sqf> | |x2= <sqf>private _viewDistance = ["ViewDistance", 2] call BIS_fnc_getParamValue;</sqf> |
Revision as of 21:36, 12 July 2022
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 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:
private _viewDistance = "ViewDistance" call BIS_fnc_getParamValue;
- Example 2:
Additional Information
- See also:
- Arma 3 Mission Parameters
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