BIS fnc configExtremes: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Configs(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 10: | Line 9: | ||
|arg= |MPARGUMENTS= | |arg= |MPARGUMENTS= | ||
|eff= |Multiplayer Effects= | |eff= |Multiplayer Effects= | ||
|Scan config paths and return min and max values for each property. | |Scan config paths and return min and max values for each property. | ||
<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). |DESCRIPTION= | <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). |DESCRIPTION= | ||
| <nowiki>[paths, properties, (propertyTypes, propertyDefaults)]</nowiki> call [[BIS_fnc_configExtremes]] |SYNTAX= | | <nowiki>[paths, properties, (propertyTypes, propertyDefaults)]</nowiki> call [[BIS_fnc_configExtremes]] |SYNTAX= | ||
Line 27: | Line 24: | ||
| [[Array]] - [minValues, maxValues] where minValues and maxValues are arrays respective to the properties array. |RETURNVALUE= | | [[Array]] - [minValues, maxValues] where minValues and maxValues are arrays respective to the properties array. |RETURNVALUE= | ||
|x1= <code>[<nowiki>[</nowiki>[[configFile]] >> "cfgWeapons"] call [[BIS_fnc_returnChildren]], ["maxRange","reloadTime"]] call [[BIS_fnc_configExtremes]];</code> |EXAMPLE1= | |x1= <code>[<nowiki>[</nowiki>[[configFile]] >> "cfgWeapons"] call [[BIS_fnc_returnChildren]], ["maxRange","reloadTime"]] call [[BIS_fnc_configExtremes]];</code> |EXAMPLE1= | ||
| |SEEALSO= | | |SEEALSO= |
Revision as of 22:41, 16 January 2021
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:
[[configFile >> "cfgWeapons"] call BIS_fnc_returnChildren, ["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