Difficulty Settings – Arma 3 Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Lou Montana moved page Talk:Arma 3 Difficulty Menu to Talk:Arma 3: Difficulty Menu: Text replacement - "^Arma 3 " to "Arma 3: ")
m (Script was moved to Biki Export Scripts page)
Tag: Blanking
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Autogen config code ==


<code>"debug_console" callExtension format ["class Difficulties"];
"debug_console" callExtension format ["{"];
_cfg = configFile >> "CfgDifficulties";
{
_class = configName _x;
"debug_console" callExtension format ["    class %1", _class];
"debug_console" callExtension format ["    {"];
"debug_console" callExtension format ["        class Flags"];
"debug_console" callExtension format ["        {"];
_flags = _cfg >> _class >> "Flags";
_flagNames = [];
for "_i" from 0 to count _flags - 1 do {
_flag = _flags select _i;
_flagNames pushBack configName _flag;
};
_flagNames sort true;
{
getArray (_flags >> _x) params ["_current", "_canChange"];
if (_canChange == 1) then {
"debug_console" callExtension format [
"            %1 = %2;",
_x, _current];
} else {
"debug_console" callExtension format [
"            /* %1 = %2; - cannot be changed */",
_x, _current];
}
} forEach _flagNames;
"debug_console" callExtension format ["        };"];
{
"debug_console" callExtension format [
"        %1 = %2;",
_x, getNumber(_cfg >> _class >> _x)];
} foreach [
"precisionEnemy",
"precisionFriendly",
"skillEnemy",
"skillFriendly"
];
"debug_console" callExtension format ["    };"];
} forEach ("true" configClasses _cfg);
"debug_console" callExtension format ["};"];</code>

Latest revision as of 11:52, 28 February 2021