forceCadetDifficulty: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Page creation) |
Killzone Kid (talk | contribs) (example) |
||
Line 29: | Line 29: | ||
|x1= <code>[[private]] _previousSettings = [[forceCadetDifficulty]] [<nowiki/>[[true]], [[false]]];</code> |Example 1= | |x1= <code>[[private]] _previousSettings = [[forceCadetDifficulty]] [<nowiki/>[[true]], [[false]]];</code> |Example 1= | ||
|x2= <code>[[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; | |||
<nowiki>[</nowiki>[[true]], [[true]]] | |||
}; | |||
[[case]] "veteran": | |||
{ | |||
// showCadetHints = 0; | |||
// showCadetWP = 1; | |||
<nowiki>[</nowiki>[[false]], [[true]]] | |||
}; | |||
[[default]] | |||
{ | |||
// showCadetHints = 0; | |||
// showCadetWP = 0; | |||
<nowiki>[</nowiki>[[false]], [[false]]] | |||
}; | |||
}); | |||
}; | |||
}; | |||
<nowiki>[</nowiki>[[true]]] [[call]] _fnc_forceCadetDifficulty; | |||
<nowiki>[</nowiki>[[missionNamespace]], "GameOptionsExited", _fnc_forceCadetDifficulty] [[call]] [[BIS_fnc_addScriptedEventHandler]];</code> |Example 2= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|seealso= [[difficulty]], [[cadetMode]], [[hintCadet]] |See Also= | |seealso= [[difficulty]], [[cadetMode]], [[hintCadet]], [[Arma_3:_Event_Handlers/ScriptedEventHandlers]]|See Also= | ||
}} | }} | ||
Revision as of 07:07, 17 August 2020
Description
- Description:
- Force Cadet Difficulty assistance.
- Groups:
- Uncategorised
Syntax
- Syntax:
- forceCadetDifficulty [showHints, showWaypoints]
- Parameters:
- showHints: Boolean
- showWaypoints: Boolean
- Return Value:
- Array of Booleans - [previousShowHintsSetting, previousShowWaypointsSetting]
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, "GameOptionsExited", _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
[[Category:Introduced with arma3dev version ]][[ Category: arma3dev: New Scripting Commands | FORCECADETDIFFICULTY]][[ Category: arma3dev: Scripting Commands | FORCECADETDIFFICULTY]]