To open the achievements menu, use the toggleInterface function.


Unlocking an Achievement

When a player reaches an important milestone in-game, reward them by giving them an achievement.

idnet.achievementsSave(name, key)

See the achievementSave reference for optional arguments.

Getting Achievement Data

Calling the achievementsList function provides a list of all achievements of the game. The list can be checked for a player property. If an achievement has a player property, that means the player has unlocked it. The data is returned to the handleIDNET function as an object.

function handleIDNET(e:Event) {
    if (idnet.type == 'achievementsList'){

See the page about achievement response data for details about unlocked achievements.