forceCadetDifficulty: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "[[Arma 3: Difficulty Menu|" to "[[Arma 3: Difficulty Settings|") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.02 | |version1= 2.02 | ||
|gr1= Difficulty | |gr1= Difficulty | ||
|descr= Forces | |descr= Forces {{hl|showCadetHints}} and {{hl|showCadetWP}} global Cadet [[Arma 3: Difficulty Settings|{{arma3}} difficulty]], returns previous settings. | ||
|s1= [[forceCadetDifficulty]] [showCadetHints, showCadetWP] | |s1= [[forceCadetDifficulty]] [showCadetHints, showCadetWP] | ||
|p1= showCadetHints: [[Boolean]] - | |p1= showCadetHints: [[Boolean]] - {{hl|showCadetHints}} difficulty | ||
|p2= showCadetWP: [[Boolean]] - | |p2= showCadetWP: [[Boolean]] - {{hl|showCadetWP}} difficulty | ||
|r1= [[Array]] of [[Boolean]]s - [prev_showCadetHints, prev_showCadetWP] | |r1= [[Array]] of [[Boolean]]s - [prev_showCadetHints, prev_showCadetWP] | ||
|x1= < | |x1= <sqf>private _previousSettings = forceCadetDifficulty [true, false];</sqf> | ||
|x2= < | |x2= <sqf> | ||
private _fnc_forceCadetDifficulty = | |||
{ | { | ||
params ["_OKButtonPressed"]; | |||
if (_OKButtonPressed) then | |||
{ | { | ||
forceCadetDifficulty (switch (toLowerANSI configName ((configFile >> "CfgDifficultyPresets") select difficulty)) do | |||
{ | { | ||
case "recruit"; | |||
case "regular": | |||
{ | { | ||
// showCadetHints = 1; | // showCadetHints = 1; | ||
// showCadetWP = 1; | // showCadetWP = 1; | ||
[true, true] | |||
}; | }; | ||
case "veteran": | |||
{ | { | ||
// showCadetHints = 0; | // showCadetHints = 0; | ||
// showCadetWP = 1; | // showCadetWP = 1; | ||
[false, true] | |||
}; | }; | ||
default | |||
{ | { | ||
// showCadetHints = 0; | // showCadetHints = 0; | ||
// showCadetWP = 0; | // showCadetWP = 0; | ||
[false, false] | |||
}; | }; | ||
}); | }); | ||
}; | }; | ||
}; | }; | ||
[true] call _fnc_forceCadetDifficulty; | |||
[missionNamespace, "OnGameOptionsExited", _fnc_forceCadetDifficulty] call BIS_fnc_addScriptedEventHandler; | |||
</sqf> | |||
|seealso= [[difficulty]] | |seealso= [[difficulty]] [[cadetMode]] [[hintCadet]] [[Arma 3: Scripted Event Handlers|Arma 3 Scripted Event Handlers]] | ||
}} | }} |
Latest revision as of 13:46, 5 May 2022
Description
- Description:
- Forces showCadetHints and showCadetWP global Cadet Arma 3 difficulty, returns previous settings.
- Groups:
- Difficulty
Syntax
- Syntax:
- forceCadetDifficulty [showCadetHints, showCadetWP]
- Parameters:
- showCadetHints: Boolean - showCadetHints difficulty
- showCadetWP: Boolean - showCadetWP difficulty
- Return Value:
- Array of Booleans - [prev_showCadetHints, prev_showCadetWP]
Examples
- Example 1:
- Example 2:
- private _fnc_forceCadetDifficulty = { params ["_OKButtonPressed"]; if (_OKButtonPressed) then { forceCadetDifficulty (switch (toLowerANSI configName ((configFile >> "CfgDifficultyPresets") select difficulty)) do { case "recruit"; case "regular": { // showCadetHints = 1; // showCadetWP = 1; [true, true] }; case "veteran": { // showCadetHints = 0; // showCadetWP = 1; [false, true] }; default { // showCadetHints = 0; // showCadetWP = 0; [false, false] }; }); }; }; [true] call _fnc_forceCadetDifficulty; [missionNamespace, "OnGameOptionsExited", _fnc_forceCadetDifficulty] call BIS_fnc_addScriptedEventHandler;
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