Difference between revisions of "forceCadetDifficulty"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
 
{{Command
 
{{Command
  
|game1= arma3dev |Game name=
+
|game1= arma3dev
  
|version= 2.01 |Game version=
+
|version= 2.01
  
|arg=  |Multiplayer Arguments ("local" or "global")=
+
|arg=
  
|eff=  |Multiplayer Effects ("local" or "global")=
+
|eff=
  
|serverExec=  |Multiplayer Execution ("server" or empty)=
+
|serverExec=
  
|gr1= Difficulty |GROUP1=
+
|gr1= Difficulty
  
|descr= Forces <tt>showCadetHints</tt> and <tt>showCadetWP</tt> global Cadet [[Arma_3_Difficulty_Menu | Arma 3 difficulty]], returns previous settings. |Description=
+
|descr= Forces <tt>showCadetHints</tt> and <tt>showCadetWP</tt> global Cadet [[Arma_3_Difficulty_Menu | Arma 3 difficulty]], returns previous settings.
  
 
|mp= |Multiplayer Behaviour=
 
|mp= |Multiplayer Behaviour=
Line 19: Line 19:
 
|pr= |Problems=
 
|pr= |Problems=
  
|s1= [[forceCadetDifficulty]] [showCadetHints, showCadetWP] |Syntax=
+
|s1= [[forceCadetDifficulty]] [showCadetHints, showCadetWP]
  
|p1= showCadetHints: [[Boolean]] - <tt>showCadetHints</tt> difficulty|Parameter 1=
+
|p1= showCadetHints: [[Boolean]] - <tt>showCadetHints</tt> difficulty
  
|p2= showCadetWP: [[Boolean]] - <tt>showCadetWP</tt> difficulty|Parameter 2=
+
|p2= showCadetWP: [[Boolean]] - <tt>showCadetWP</tt> difficulty
  
|r1= [[Array]] of [[Boolean]]s - [prev_showCadetHints, prev_showCadetWP] |Return Value=
+
|r1= [[Array]] of [[Boolean]]s - [prev_showCadetHints, prev_showCadetWP]
  
|x1= <code>[[private]] _previousSettings = [[forceCadetDifficulty]] [<nowiki/>[[true]], [[false]]];</code> |Example 1=
+
|x1= <code>[[private]] _previousSettings = [[forceCadetDifficulty]] [<nowiki/>[[true]], [[false]]];</code>
  
 
|x2= <code>[[private]] _fnc_forceCadetDifficulty =  
 
|x2= <code>[[private]] _fnc_forceCadetDifficulty =  
Line 59: Line 59:
 
};
 
};
 
<nowiki>[</nowiki>[[true]]] [[call]] _fnc_forceCadetDifficulty;
 
<nowiki>[</nowiki>[[true]]] [[call]] _fnc_forceCadetDifficulty;
<nowiki>[</nowiki>[[missionNamespace]], "OnGameOptionsExited", _fnc_forceCadetDifficulty] [[call]] [[BIS_fnc_addScriptedEventHandler]];</code> |Example 2=
+
<nowiki>[</nowiki>[[missionNamespace]], "OnGameOptionsExited", _fnc_forceCadetDifficulty] [[call]] [[BIS_fnc_addScriptedEventHandler]];</code>
  
|seealso= [[difficulty]], [[cadetMode]], [[hintCadet]], [[Arma_3:_Event_Handlers/ScriptedEventHandlers|Arma 3 Scripted Event Handlers]]|See Also=
+
|seealso= [[difficulty]], [[cadetMode]], [[hintCadet]], [[Arma_3:_Event_Handlers/ScriptedEventHandlers|Arma 3 Scripted Event Handlers]]
 
}}
 
}}
  

Revision as of 00:37, 18 January 2021

-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version |?]]
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 ]][[ Category: arma3dev: New Scripting Commands | FORCECADETDIFFICULTY]][[ Category: arma3dev: Scripting Commands | FORCECADETDIFFICULTY]]

Bottom Section