{"name":"difficulty","operator":null,"title":"difficulty","type":"command","url":"https://community.bistudio.com/wiki/difficulty","revid":353045,"updated":"2024-03-12T12:13:06Z","groups":["Difficulty"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.56"}],"since":{"game":"arma3","name":"Arma 3","version":"0.56"},"arma3_since":"0.56","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns high-level selected difficulty mode.","syntaxes":[{"syntax":"difficulty","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Number","types":["Number"],"description":"Can be one of: - 0 (Recruit) - 1 (Regular) - 2 (Veteran) - 3 (Elite)","text":"Number - Can be one of:\n- 0 (Recruit)\n- 1 (Regular)\n- 2 (Veteran)\n- 3 (Elite)"},"form":"nullary","operator":null,"left":null,"right":null}],"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"]}],"multiplayer":null,"problems":null,"aliases":[],"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."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Difficulty","Introduced with Arma 3 version 0.56","Scripting Commands"]}