configProperties: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
m (added category config) |
||
Line 45: | Line 45: | ||
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]] | [[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Command Group: Config|{{uc:{{PAGENAME}}}}]] |
Revision as of 13:02, 20 December 2019
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 entires.
- Groups:
- Uncategorised
Syntax
- Syntax:
- configProperties [config, condition, inherit]
- Parameters:
- [config, condition, inherit]: Array
- config: Config - config entry to search
- condition (Optional): String - expression, which if returns true, adds current property to result. Default: "true"
- inherit (Optional): Boolean - include inherited properties. Default: true
- Return Value:
- Array - Array of Configs
Examples
- Example 1:
_configs = configProperties [configFile >> "CfgVehicles" >> "O_Truck_02_box_F"];
- Example 2:
_configs = configProperties [configFile >> "RscText", "true", true];
- Example 3:
- Get all hitpoints of a truck:
_hitPoints = []; _hitPointsCfgs = configProperties [ configFile >> "CfgVehicles" >> "O_Truck_02_box_F" >> "HitPoints", "true", true ]; hint str _hitPointsCfgs;
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