unlockAchievement: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ")
m (Some wiki formatting)
 
(5 intermediate revisions by the same user not shown)
Line 17: Line 17:
|gr2= System
|gr2= System


|descr= 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]].<br></br>
|descr= 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]].<br><br>


{{Feature | important | This command is obsolete and was used in the experimental (unreleased) {{arma2}} Xbox 360 version as stated
{{Feature|important|
[https://forums.bohemia.net/forums/topic/187873-unlockachievment-command/?tab{{=}}comments#comment-2978436 here]. }}
This command is obsolete and was used in the experimental (unreleased) {{arma2}} Xbox 360 version as stated
{{Feature | arma3 | To unlock a [[Arma 3 Stat Names|Steam Achievement]] for {{arma3}}, see [[setStatValue]].}}
{{Link|https://forums.bohemia.net/forums/topic/187873-unlockachievment-command/?tab{{=}}comments#comment-2978436|here}}.
}}
{{Feature|arma3|To unlock a [[Arma 3: Stat Names|Steam Achievement]] for {{arma3}}, see [[setStatValue]].}}


|s1= [[unlockAchievement]] name
|s1= [[unlockAchievement]] name
Line 29: Line 31:
|r1= [[Boolean]] - [[true]] if achievement was unlocked
|r1= [[Boolean]] - [[true]] if achievement was unlocked


|x1= <code>_isUnlocked = [[unlockAchievement]] "Hunter";</code>
|x1= <sqf>_isUnlocked = unlockAchievement "Hunter";</sqf>


|seealso= [[setStatValue]]
|seealso= [[setStatValue]]
}}
}}

Latest revision as of 12:07, 5 May 2024

Hover & click on the images for description

Description

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.

This command is obsolete and was used in the experimental (unreleased) Arma 2 Xbox 360 version as stated here.
Arma 3
To unlock a Steam Achievement for Arma 3, see setStatValue.
Groups:
Broken CommandsSystem

Syntax

Syntax:
unlockAchievement name
Parameters:
name: String - achievement name
Return Value:
Boolean - true if achievement was unlocked

Examples

Example 1:
_isUnlocked = unlockAchievement "Hunter";

Additional Information

See also:
setStatValue

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