configFile
Hover & click on the images for descriptions
Description
- Description:
-
Return root of config entries hierarchy.
See AllInOne Config for a full config extract as example.
Syntax
Examples
- Example 1:
-
_isMyClassActive = isClass (configFile / "CfgPatches" / "MyClass");
Additional Information
- See also:
- configClassesmissionConfigFilecampaignConfigFileconfig/nameconfig >> nameconfigNamecountgetArraygetTextgetNumberinheritsFromisArrayisClassisNumberisTextselect
- Groups:
- Uncategorised
Notes
Notes
- Posted on Apr 3, 2014 - 00:37
- ffur2007slx2_5
-
In ArmA3 ver 1.14 there’re several comfortable workarounds with configFile for collecting subclasses. As for traditional workaround like:
(configfile >> "CfgFaces") call { private ["_classes"]; _classes = []; for "_i" from 0 to ((count _this) - 1) do { if (isClass (_this select _i)) then { _classes set [count _classes, configName (_this select _i)]; }; }; _classes }; //return: ["Default"……"O_Colonel"] 8 items
Alternative recommended workaround by using: BIS_fnc_getCfgSubClasses e.g.(configfile >> "CfgFaces") call BIS_fnc_getCfgSubClasses //Same as traditional workaround
Another powerful replacement is using BIS_fnc_returnChildren to collect grandchildren classes with desired level, e.g.[(configfile >> "CfgFaces"),1,true,true] call BIS_fnc_returnChildren; //Return all children faces with a total number at 68
And as for another advanced workaround for direct processing collected classes, use BIS_fnc_uniqueClasses. E.g.my_array = []; [(configfile >> "BombCrater"), { my_array set [count my_array,(_this select 2) call bis_fnc_getcfgdata] } ] call BIS_fnc_uniqueClasses; //return [[0,0,0],[0,0,0],[0,0,0]]
Bottom Section
Categories:
- Pages using duplicate arguments in template calls
- Scripting Commands
- Arma: Scripting Commands
- Arma: New Scripting Commands
- Command Group: Uncategorised
- Pages with broken file links
- Introduced with Arma version 1.00
- Scripting Commands ArmA
- Command Group: System Commands
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters