{"name":"unlockAchievement","operator":null,"title":"unlockAchievement","type":"command","url":"https://community.bistudio.com/wiki/unlockAchievement","revid":364204,"updated":"2024-05-05T11:07:39Z","groups":["Broken Commands","System"],"status":"broken","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Unlocks the given achievement. The achievements are listed in CfgAchievements, however none of the currently listed achievements is used in Arma 3, hence the command always returns false.\n\n> [!IMPORTANT]\n> This command is obsolete and was used in the experimental (unreleased) Arma 2 Xbox 360 version as stated\n> [here](https://forums.bohemia.net/forums/topic/187873-unlockachievment-command/?tab=comments#comment-2978436).\n\n> [!NOTE]\n> **Arma 3:** To unlock a Steam Achievement for Arma 3, see setStatValue.","syntaxes":[{"syntax":"unlockAchievement name","since":null,"effect":null,"exec":null,"params":[{"name":"name","type":"String","optional":false,"default":null,"description":"achievement name","types":["String"],"since":null,"text":"name: String - achievement name"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true if achievement was unlocked","text":"Boolean - true if achievement was unlocked"},"form":"unary","operator":null,"left":null,"right":{"text":"name","types":["String"]}}],"examples":[{"text":"```sqf\n_isUnlocked = unlockAchievement \"Hunter\";\n```","code":["_isUnlocked = unlockAchievement \"Hunter\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setStatValue"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Broken Commands","Command Group: System","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}