{"name":"difficulty","title":"difficulty","type":"command","url":"https://community.bistudio.com/wiki/difficulty","revid":353045,"updated":"2024-03-12T12:13:06Z","groups":["Difficulty"],"status":"ok","games":{"arma3":"0.56"},"since":"arma3 0.56","arma3_since":"0.56","description":"Returns high-level selected difficulty mode.","syntaxes":[{"syntax":"difficulty","params":[],"returns":{"type":"Number","type_expr":"Number","description":"Can be one of:\n- 0 (Recruit) - 1 (Regular) - 2 (Veteran) - 3 (Elite)","text":"Number - Can be one of:\n\n- 0 (Recruit)\n- 1 (Regular)\n- 2 (Veteran)\n- 3 (Elite)"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (difficulty == 0) then\n{\n    hint \"You will need to follow my lead - read the Field Manual!\";\n};\n```","code":["if (difficulty == 0) then\n{\n\thint \"You will need to follow my lead - read the Field Manual!\";\n};"]},{"text":"The command returns the index of selected difficulty as they appear in *CfgDifficulties*:\n\n```sqf\nhint str difficulty; //Result: 4\n```","code":["hint str difficulty; //Result: 4"]}],"see_also":["difficultyOption","Arma 3: Difficulty Settings","missionDifficulty"],"notes":[{"user":"POLPOX","date":"2023-08-22T06:31:21Z","text":"The return value can be overwritten by the forcedDifficulty by the server if it is a MP session."}]}