unlockAchievement: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|gr1= Broken Command |GROUP1=
|game3= tkoh
|version3= 1.00


|gr2= System |GROUP2=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| 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>
|gr1= Broken Commands


{{Important | This command is obsolete and was used in the experimental (unreleased) {{arma2}} Xbox 360 version as stated
|gr2= System
[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]].}} |DESCRIPTION=
____________________________________________________________________________________________


| [[unlockAchievement]] name |SYNTAX=
|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>


|p1= name: [[String]] - achievement name |PARAMETER1=
{{Feature|important|
This command is obsolete and was used in the experimental (unreleased) {{arma2}} Xbox 360 version as stated
{{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]].}}


| [[Boolean]] - [[true]] if achievement was unlocked|RETURNVALUE=
|s1= [[unlockAchievement]] name


|p1= name: [[String]] - achievement name


|x1= <code>_isUnlocked = [[unlockAchievement]] "Hunter";</code> |EXAMPLE1=
|r1= [[Boolean]] - [[true]] if achievement was unlocked


____________________________________________________________________________________________
|x1= <sqf>_isUnlocked = unlockAchievement "Hunter";</sqf>


|[[setStatValue]] |SEEALSO=
|seealso= [[setStatValue]]
 
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

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