missionDifficulty: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (see also)
(Add example)
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|=
{{RV|type=command
____________________________________________________________________________________________
 
|arma3 |= Game
|game1= arma3
|1.62|= Game Version
|version1= 1.62
|arg=  |= Multiplayer Arguments
 
|eff= |= Multiplayer Effects
|gr1= Difficulty
____________________________________________________________________________________________
 
| Return difficulty that has been forced for this mission, returns -1 if difficulty is not forced and it's used one from player's options. |= Description
|gr2= Mission Information
____________________________________________________________________________________________
 
| [[missionDifficulty]] |= Syntax
|descr= Return difficulty that has been forced for this mission, returns -1 if difficulty is not forced and it is used one from player's options.
|p1=  |= Parameter 1
 
|p2=  |= Parameter 2
|s1= [[missionDifficulty]]
|p3=  |= Parameter 3
 
|p3= |= Parameter 4
|r1= [[Number]]
|p3=  |= Parameter 5
|p3=  |= Parameter 6
| [[Number]] |= Return Value
|x1=  |= Example 1
| [[difficultyOption]] [[difficulty]] |= See Also
}}


<dl class='command_description'>
|x1= <sqf>private _number = missionDifficulty;</sqf>
<!-- BEGIN Note Section -->
<!-- For example:
<dd class='notedate'>Posted on Month Day, Year - Time (UTC)</dd>
<dt class='note'>'''[[User:User Name|User Name]]'''</dt>
<dd class='note'>This is an example note. It is true and verifiable, and contains a little code snippet.
<code>[[if]] ([[_this]] == anExample) [[then]] { [[hint]] Leave it here for others to read; };</code></dd>
-->
<!-- END Note Section -->
</dl>


<h3 style='display:none'>Bottom Section</h3>
|x2= <sqf>
<!-- Appropriate categories go here -->
private _playedDifficulty = missionDifficulty;
if (_playedDifficulty == -1) then
{
_playedDifficulty = difficulty;
};
</sqf>


[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
|seealso= [[difficultyOption]] [[difficulty]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
}}

Latest revision as of 15:02, 16 February 2023

Hover & click on the images for description

Description

Description:
Return difficulty that has been forced for this mission, returns -1 if difficulty is not forced and it is used one from player's options.
Groups:
DifficultyMission Information

Syntax

Syntax:
missionDifficulty
Return Value:
Number

Examples

Example 1:
private _number = missionDifficulty;
Example 2:
private _playedDifficulty = missionDifficulty; if (_playedDifficulty == -1) then { _playedDifficulty = difficulty; };

Additional Information

See also:
difficultyOption difficulty

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