🏅Achievements

You need to create an achievement on your dashboard before proceeding.

How achievements work

Achievements are badges that can be given to players. They'll show up on the player's profile and can optionally have a prize associated with them (which will be automatically awarded once you set up the achievement in the dashboard).

The prize can be your own currency (use the Prize functions to reconcile balances) or Galaxy Coins which don't require manual reconciliation.

This will give the current player an achievement (and a prize if applicable). This is displayed on their profile.

 GalaxyClientAPI.AwardAchievement(new GalaxySDK.ClientModels.AwardAchievementRequest {
     Id = "achievement_id"
 }, result => { }, error => { });

This will get a list of the player's achievements. Omit the PlayerId parameter to get the current player's achievements.

 GalaxyClientAPI.GetAchievements(new GalaxySDK.ClientModels.GetAchievementsRequest {
     PlayerId = "player_id" //optional
 }, result => { 
     //Use result.Achievements
 }, error => { });
Achievement Response Object

Response

/// Achievements for the requested user.
public List<Achievement> Achievements;

Achievement reference

Users can see their achievements on their profile, which is also accessible from the leaderboard. This call is an optional way for you to shortcut to the achievements view that shows a list of earned + unearned achievements.

GalaxyClientAPI.Controller.OpenAchievements();

Last updated