difficultyOption: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 37: | Line 37: | ||
|r1= [[Number]] | |r1= [[Number]] | ||
|s2= [[difficultyOption]] array | |||
|s2since= arma3 2.14 | |||
|p21= array: [[Array]] - any array, could be empty array [] | |||
|r2= [[Array]] - array of all options and current values in format <nowiki>[</nowiki>["Option1", value1], ...["OptionN", valueN]] | |||
|x1= <sqf>hint str (difficultyOption "friendlyTags");</sqf> | |x1= <sqf>hint str (difficultyOption "friendlyTags");</sqf> | ||
|x2= Remember last [[cameraView]] per vehicle: | |x2= Remember last [[cameraView]] per vehicle: | ||
<sqf>player addEventHandler ["GetOutMan", { | <sqf> | ||
player addEventHandler ["GetOutMan", { | |||
params ["_unit", "", "_vehicle"]; | params ["_unit", "", "_vehicle"]; | ||
_unit setVariable [_vehicle call BIS_fnc_netId, cameraView]; | _unit setVariable [_vehicle call BIS_fnc_netId, cameraView]; | ||
Line 50: | Line 57: | ||
_unit switchCamera (_unit getVariable [_vehicle call BIS_fnc_netId, "INTERNAL"]); | _unit switchCamera (_unit getVariable [_vehicle call BIS_fnc_netId, "INTERNAL"]); | ||
}; | }; | ||
}];</sqf> | }]; | ||
</sqf> | |||
|seealso= [[difficulty]] [[difficultyEnabledRTD]] [[Arma 3: Difficulty Settings]] [[missionDifficulty]] | |seealso= [[difficulty]] [[difficultyEnabledRTD]] [[Arma 3: Difficulty Settings]] [[missionDifficulty]] | ||
}} | }} |
Latest revision as of 11:34, 3 September 2024
Description
- Description:
- Checks specific difficulty settings of the current user.
Difficulty flag names can be found in the CfgDifficultyPresets config class or in ArmA profile file under class DifficultyPresets
/xxx /Options (xxx being Recruit, Regular or Veteran). This command replaces difficultyEnabled as many options have multiple values and former command only provided Boolean return. - Groups:
- Difficulty
Syntax
- Syntax:
- difficultyOption optionName
- Parameters:
- optionName: String - difficulty option name; one of:
- reducedDamage
- groupIndicators
- friendlyTags
- enemyTags
- detectedMines
- commands
- waypoints
- weaponInfo
- stanceIndicator
- staminaBar
- weaponCrosshair
- visionAid
- thirdPersonView
- cameraShake
- scoreTable
- deathMessages
- vonID
- mapContent
- autoReport
- multipleSaves
- Return Value:
- Number
Alternative Syntax
- Syntax:
- difficultyOption array
- Parameters:
- array: Array - any array, could be empty array []
- Return Value:
- Array - array of all options and current values in format [["Option1", value1], ...["OptionN", valueN]]
Examples
- Example 1:
- Example 2:
- Remember last cameraView per vehicle:
player addEventHandler ["GetOutMan", { params ["_unit", "", "_vehicle"]; _unit setVariable [_vehicle call BIS_fnc_netId, cameraView]; }]; player addEventHandler ["GetInMan", { if (difficultyOption "thirdPersonView" == 2) then { params ["_unit", "", "_vehicle"]; _unit switchCamera (_unit getVariable [_vehicle call BIS_fnc_netId, "INTERNAL"]); }; }];
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