BIS fnc configExtremes: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " " to " ")
m (Some wiki formatting)
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| arma3
|game1= arma3
 
|version1= 1.36
|1.36


|gr1= Configs
|gr1= Configs


|arg=
|descr= Scan config paths and return min and max values for each property.<br>
|eff=
Can be used only for properties of type [[Number]] and [[Array]] (value is considered to be the geometric mean of all numbers in the array).


|Scan config paths and return min and max values for each property.
|s1= [paths, properties, propertyTypes, propertyDefaults] call [[BIS_fnc_configExtremes]]
<br>Can be used only for properties of type [[Number]] and [[Array]] (value is considered to be the geometric mean of all numbers in the array).
 
| <nowiki>[paths, properties, (propertyTypes, propertyDefaults)]</nowiki> call [[BIS_fnc_configExtremes]]


|p1= paths: [[Array]] of [[Config]]s - paths to be scanned.
|p1= paths: [[Array]] of [[Config]]s - paths to be scanned.
Line 23: Line 19:
|p4= propertyDefaults (Optional): [[Array]] of [[Number]]s - value to be used in cases where the property at the respective index is not defined. Default: 0
|p4= propertyDefaults (Optional): [[Array]] of [[Number]]s - value to be used in cases where the property at the respective index is not defined. Default: 0


| [[Array]] - [minValues, maxValues] where minValues and maxValues are arrays respective to the properties array.
|r1= [[Array]] - [minValues, maxValues] where minValues and maxValues are arrays respective to the properties array.


|x1= <code>[<nowiki>[</nowiki>[[configFile]] >> "cfgWeapons"] call [[BIS_fnc_returnChildren]], ["maxRange","reloadTime"]] call [[BIS_fnc_configExtremes]];</code>
|x1= <code>[[private]] _paths = [<nowiki/>[[configFile]] >> "cfgWeapons"] [[call]] [[BIS_fnc_returnChildren]];
[_paths, ["maxRange", "reloadTime"]] call [[BIS_fnc_configExtremes]];</code>
 
|seealso=
}}
}}
[[Category:Functions|{{uc:configExtremes}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:configExtremes}}]]

Revision as of 00:44, 14 June 2021

Hover & click on the images for description

Description

Description:
Scan config paths and return min and max values for each property.
Can be used only for properties of type Number and Array (value is considered to be the geometric mean of all numbers in the array).
Execution:
call
Groups:
Configs

Syntax

Syntax:
[paths, properties, propertyTypes, propertyDefaults] call BIS_fnc_configExtremes
Parameters:
paths: Array of Configs - paths to be scanned.
properties: Array of Strings - class names of properties to be evaluated.
propertyTypes (Optional): Array of Booleans - whether the property at the respective index should be evaluated and returned as a logarithmic number. Default: false
propertyDefaults (Optional): Array of Numbers - value to be used in cases where the property at the respective index is not defined. Default: 0
Return Value:
Array - [minValues, maxValues] where minValues and maxValues are arrays respective to the properties array.

Examples

Example 1:
private _paths = [configFile >> "cfgWeapons"] call BIS_fnc_returnChildren; [_paths, ["maxRange", "reloadTime"]] call BIS_fnc_configExtremes;

Additional Information

See also:
See also needed

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