configProperties: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " (\|[pr][0-9]+ *= *[^-]+) *- *A([a-z])" to " $1 - a$2") |
Lou Montana (talk | contribs) m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|") |
||
Line 10: | Line 10: | ||
Condition has to return [[true]] in order for the looked at property to be added to the resulting array. A bit slower than [[configClasses]] but allows to access inherited entries. | Condition has to return [[true]] in order for the looked at property to be added to the resulting array. A bit slower than [[configClasses]] but allows to access inherited entries. | ||
{{Feature|Warning|The condition code passed to [[configProperties]] should only be used for '''simple filter expressions''' and nothing more.}} | {{Feature|Warning|The condition code passed to [[configProperties]] should only be used for '''simple filter expressions''' and nothing more.}} | ||
{{Feature| | {{Feature|informative|Since {{GVI|arma3|2.02}} the following conditions are optimised for performance: | ||
* {{hl|"true"}} (omitted condition) | * {{hl|"true"}} (omitted condition) | ||
* {{hl|"isClass _x"}} | * {{hl|"isClass _x"}} |
Revision as of 00:24, 2 February 2024
Description
- Description:
- Returns an array of config entries which meet criteria in condition code. Command iterates through available classes and config properties for given config entry. If 3rd param is true the search also includes inherited properties. Current looked at config is stored in _x variable (similar to alternative count command implementation). Condition has to return true in order for the looked at property to be added to the resulting array. A bit slower than configClasses but allows to access inherited entries.
- Groups:
- Config
Syntax
- Syntax:
- configProperties [config, condition, inherit]
- Parameters:
- config: Config - config entry to search
- condition: String - (Optional, default "true") expression, which if returns true, adds current property to result
- inherit: Boolean - (Optional, default true) include inherited properties
- Return Value:
- Array - array of Configs
Examples
- Example 1:
- Example 2:
- Example 3:
- Get all hitpoints of a truck:
Additional Information
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