difficulty: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[[Cc]ategory:[ _]?Arma[ _]3:[ _]([^|]*)[ _]?\|.*\]\]" to "{{GameCategory|arma3|$1}}")
m (Some wiki formatting)
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 0.56


|0.56|Game version=
|gr1= Difficulty


|gr1= Difficulty |GROUP1=
|descr= Returns high-level selected difficulty mode.
____________________________________________________________________________________________


| Returns high-level selected difficulty mode. 
|s1= [[difficulty]]


Returned value will be: 0 (Recruit), 1 (Regular), 2 (Veteran) or 3 (Elite)|DESCRIPTION=
|r1= [[Number]] - Can be one of:
____________________________________________________________________________________________
* 0 (Recruit)
* 1 (Regular)
* 2 (Veteran)
* 3 (Elite)


| '''difficulty'''  |SYNTAX=
|x1= <sqf>
if (difficulty == 0) then
{
hint "You will need to follow my lead - read the Field Manual!";
};
</sqf>


| [[Number]] |RETURNVALUE=
|x2= [[File:Difficulty.jpg|400px|thumb|Note: "Insane" is a modded difficulty]] The command returns the index of selected difficulty as they appear in ''CfgDifficulties'':
<sqf>hint str difficulty; //Result: 4</sqf>


|seealso= [[difficultyOption]] [[Arma 3: Difficulty Settings]] [[missionDifficulty]]
}}


|x1= <code>value = [[difficulty]];</code>|EXAMPLE1=  
{{Note
|x2= The command returns the index of selected difficulty as they appear in ''CfgDifficulties''
|user= POLPOX
[[Image:Difficulty.jpg|400px|Note: "Insane" is a modded difficulty]]
|timestamp= 20230822063121
<code>[[hint]] [[str]] [[difficulty]]; //Result: 4</code>|EXAMPLE2=
|text= The return value can be overwritten by the [[Arma 3: Server Config File|forcedDifficulty]] by the server if it is a MP session.
 
____________________________________________________________________________________________
 
| [[difficultyOption]], [[Arma 3 Difficulty Menu]] [[missionDifficulty]] |SEEALSO=
 
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
{{GameCategory|arma3|New_Scripting_Commands_List}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 13:13, 12 March 2024

Hover & click on the images for description

Description

Description:
Returns high-level selected difficulty mode.
Groups:
Difficulty

Syntax

Syntax:
difficulty
Return Value:
Number - Can be one of:
  • 0 (Recruit)
  • 1 (Regular)
  • 2 (Veteran)
  • 3 (Elite)

Examples

Example 1:
if (difficulty == 0) then { hint "You will need to follow my lead - read the Field Manual!"; };
Example 2:
Note: "Insane" is a modded difficulty
The command returns the index of selected difficulty as they appear in CfgDifficulties:
hint str difficulty; //Result: 4

Additional Information

See also:
difficultyOption Arma 3: Difficulty Settings missionDifficulty

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
POLPOX - c
Posted on Aug 22, 2023 - 06:31 (UTC)
The return value can be overwritten by the forcedDifficulty by the server if it is a MP session.