missionDifficulty: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \{\{GameCategory *\| *arma3 *\| *(New )?Scripting Commands\}\}" to "")
(Add example)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command
|arma3
 
|1.62
|game1= arma3
|arg=
|version1= 1.62
 
|gr1= Difficulty
|gr1= Difficulty


|gr2= Mission Information
|gr2= Mission Information
| 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.
 
| [[missionDifficulty]]
|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.
 
|s1= [[missionDifficulty]]
 
|r1= [[Number]]
|r1= [[Number]]


|x1= <code>_number = [[missionDifficulty]];</code>
|x1= <sqf>private _number = missionDifficulty;</sqf>
 
|x2= <sqf>
private _playedDifficulty = missionDifficulty;
if (_playedDifficulty == -1) then
{
_playedDifficulty = difficulty;
};
</sqf>
 
|seealso= [[difficultyOption]] [[difficulty]]
|seealso= [[difficultyOption]] [[difficulty]]
}}
}}

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