---
name: "forceCadetDifficulty"
type: command
status: ok
groups: ["Difficulty"]
arma3_since: "2.02"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/forceCadetDifficulty
revid: 310147
updated: 2022-05-05T12:46:27Z
---

# forceCadetDifficulty

*Command · Difficulty · Arma 3 v2.02*

## Description

Forces `showCadetHints` and `showCadetWP` global Cadet Arma 3 difficulty, returns previous settings.

## Syntax

```sqf
forceCadetDifficulty [showCadetHints, showCadetWP]
```

**Parameters:**

- `showCadetHints`: [Boolean](../topics/Boolean.md) - `showCadetHints` difficulty
- `showCadetWP`: [Boolean](../topics/Boolean.md) - `showCadetWP` difficulty

**Returns:** [Array](../topics/Array.md) of [Boolean](../topics/Boolean.md)s - [prev_showCadetHints, prev_showCadetWP]

## Examples

### Example 1

```sqf
private _previousSettings = forceCadetDifficulty [true, false];
```

### Example 2

```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;
```

## See also

[difficulty](../commands/difficulty.md) · [cadetMode](../commands/cadetMode.md) · [hintCadet](../commands/hintCadet.md) · [Arma 3: Scripted Event Handlers](../topics/Scripted_Event_Handlers.md)

<sub>Source: [BI Community Wiki — forceCadetDifficulty](https://community.bistudio.com/wiki/forceCadetDifficulty) (revision 310147).</sub>
