forceCadetDifficulty: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <dl class="command_description"> <!-- BEGIN Note Section --> <!-- END Note Section --> </dl>" to "")
m (fixed link to difficulty doc)
Line 13: Line 13:
|gr1= Difficulty
|gr1= Difficulty


|descr= Forces <tt>showCadetHints</tt> and <tt>showCadetWP</tt> global Cadet [[Arma_3_Difficulty_Menu | Arma 3 difficulty]], returns previous settings.
|descr= Forces <tt>showCadetHints</tt> and <tt>showCadetWP</tt> global Cadet [[Arma 3: Difficulty Menu|{{arma3}} difficulty]], returns previous settings.


|mp= |Multiplayer Behaviour=
|mp= |Multiplayer Behaviour=

Revision as of 17:36, 1 February 2021

-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 2.01|2.01]]
Hover & click on the images for description

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:
private _previousSettings = forceCadetDifficulty [true, false];
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

See also:
difficultycadetModehintCadetArma 3 Scripted Event Handlers

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

[[Category:Introduced with arma3dev version 2.01]][[ Category: arma3dev: New Scripting Commands | FORCECADETDIFFICULTY]][[ Category: arma3dev: Scripting Commands | FORCECADETDIFFICULTY]]