# Achievements

**Support**

Use this to determine if you can implement achievements for your game on the current platform.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FUDjb2AsdaJSIywUY7CjB%2FScreenshot%202025-01-22%20at%2012.47.30.png?alt=media&#x26;token=bad09dc7-2439-40cd-9f88-c856e31be7f1" alt=""><figcaption></figcaption></figure>

Check if getting list of achievements is supported.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FP7aC2tRYKXvzHSkhwsOb%2FScreenshot%202025-01-22%20at%2012.48.26.png?alt=media&#x26;token=70886e2f-a450-46a1-b346-624f5b30bfb3" alt=""><figcaption></figcaption></figure>

Check if built-in popup is supported.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FPuphFbQCWaTAbsWxdaxF%2FScreenshot%202025-01-22%20at%2012.49.19.png?alt=media&#x26;token=1a8cc90e-3f56-43ac-938e-335749b2686d" alt=""><figcaption></figcaption></figure>

#### Unlock achievement <a href="#purchase" id="purchase"></a>

Unlocks achievement for a player.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FlRUERZ0FzHXfGbjPTyGZ%2FScreenshot%202025-01-22%20at%2012.54.53.png?alt=media&#x26;token=583152c5-c1e6-480a-89c6-d00ba8e907ef" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::PlatformId()","=","\"y8\""]}],"actions":[{"type":{"value":"PlaygamaBridge::AddActionParameter"},"parameters":["","\"achievementkey\"","\"YOUR_ACHIEVEMENT_KEY\"",""]},{"type":{"value":"PlaygamaBridge::AddActionParameter"},"parameters":["","\"achievement\"","\"YOUR_ACHIEVEMENT_NAME\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::PlatformId()","=","\"lagged\""]}],"actions":[{"type":{"value":"PlaygamaBridge::AddActionParameter"},"parameters":["","\"achievement\"","\"YOUR_ACHIEVEMENT_ID\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PlaygamaBridge::AchievementsUnlock"},"parameters":["",""]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnAchievementsUnlockCompleted"},"parameters":["",""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"success\"","\"info\"",""]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>

**Get List**

Returns the achievement list in JSON

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2Fp1LpeQN4845IKnFJqjSK%2FScreenshot%202025-01-22%20at%2017.53.08.png?alt=media&#x26;token=c704d711-7066-49d7-b727-0bb9663af1f1" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[{"type":{"value":"PlaygamaBridge::AchievementsGetList"},"parameters":["",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnAchievementsGetListCompleted"},"parameters":["",""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CurrentIndex","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"PlaygamaBridge::AchievementsCount()","conditions":[],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareStrings"},"parameters":["PlaygamaBridge::PlatformId()","=","\"y8\""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Achievement ID:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"achievementid\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Achievement Name:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"achievement\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Achievement Key:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"achievementkey\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Description:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"description\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Icon:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"icon\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Difficulty:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"difficulty\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Awarded:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"awarded\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Secret:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"secret\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Game:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"game\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Link:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"link\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Player ID:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"playerid\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Player Name:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"playername\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Last Updated:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"last updated\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Date:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"date\")","\"info\"",""]},{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Relative Date:\" + PlaygamaBridge::AchievementPropertyValue(CurrentIndex, \"rdate\")","\"info\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CurrentIndex","+","1"]}]}]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>

**Show Native Popup**

Some platforms support built-in achievement list which is shown in overlay

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FhkbLTLfSpUvHs5XdRHlm%2FScreenshot%202025-01-22%20at%2013.12.07.png?alt=media&#x26;token=3ca9fca6-8a4b-4228-9419-3f4960d95eab" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[{"type":{"value":"PlaygamaBridge::AchievementsShowNativePopup"},"parameters":["",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnAchievementsShowNativePopupCompleted"},"parameters":["",""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"success\"","\"info\"",""]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>
