Difference between revisions of "forceCadetDifficulty"

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page creation)
 
m (Some wiki formatting)
 
(25 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command
+
{{RV|type=command
  
|game1= arma3dev |Game name=
+
|game1= arma3
 +
|version1= 2.02
  
|version= 2.01 |Game version=
+
|gr1= Difficulty
  
|arg= |Multiplayer Arguments ("local" or "global")=
+
|descr= Forces {{hl|showCadetHints}} and {{hl|showCadetWP}} global Cadet [[Arma 3: Difficulty Settings|{{arma3}} difficulty]], returns previous settings.
  
|eff=  |Multiplayer Effects ("local" or "global")=
+
|s1= [[forceCadetDifficulty]] [showCadetHints, showCadetWP]
  
|serverExec= |Multiplayer Execution ("server" or empty)=
+
|p1= showCadetHints: [[Boolean]] - {{hl|showCadetHints}} difficulty
____________________________________________________________________________________________
 
  
|descr= Force Cadet Difficulty assistance. |Description=
+
|p2= showCadetWP: [[Boolean]] - {{hl|showCadetWP}} difficulty
  
|mp= |Multiplayer Behaviour=
+
|r1= [[Array]] of [[Boolean]]s - [prev_showCadetHints, prev_showCadetWP]
  
|pr= |Problems=
+
|x1= <sqf>private _previousSettings = forceCadetDifficulty [true, false];</sqf>
____________________________________________________________________________________________
 
  
|s1= [[forceCadetDifficulty]] [showHints, showWaypoints] |Syntax=
+
|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;
 +
// 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;
 +
</sqf>
  
|p1= showHints: [[Boolean]] |Parameter 1=
+
|seealso= [[difficulty]] [[cadetMode]] [[hintCadet]] [[Arma 3: Scripted Event Handlers|Arma 3 Scripted Event Handlers]]
 
 
|p2= showWaypoints: [[Boolean]] |Parameter 2=
 
 
 
|r1= [[Array]] of [[Boolean]]s - [previousShowHintsSetting, previousShowWaypointsSetting] |Return Value=
 
____________________________________________________________________________________________
 
 
 
|x1= <code>[[private]] _previousSettings = [[forceCadetDifficulty]] [<nowiki/>[[true]], [[false]]];</code> |Example 1=
 
____________________________________________________________________________________________
 
 
 
|seealso= [[difficulty]], [[cadetMode]], [[hintCadet]] |See Also=
 
 
}}
 
}}
 
<dl class="command_description">
 
<!-- BEGIN Note Section -->
 
 
<!-- END Note Section -->
 
</dl>
 
 
<h3 style="display:none">Bottom Section</h3>
 

Latest revision as of 13:46, 5 May 2022

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:
difficulty cadetMode hintCadet Arma 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