GameKit.Achievement.SetPercentComplete
--------------------------------------

Sets percent complete.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [GameKit](component_GameKit.md) | [8.5](newinversion85.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "GameKit.Achievement.SetPercentComplete"; AchievementRef; Value ) 

**MBS**( **"GameKit.Achievement.SetPercentComplete";** /\* Sets percent complete. \*/  
**$AchievementRef**; /\* The identifier for the achievement.e.g. $Achievement \*/   
**$Value**) /\* The new percent value.e.g. 100 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| AchievementRef | The identifier for the achievement. | $Achievement |
| Value | The new percent value. | 100 |

### Result

Returns OK or error.

### Description

Sets percent complete.  
A percentage value that states how far the player has progressed on this achievement.  
  
The default value for a newly initialized achievement object is 0.0. The range of legal values is between 0.0 and 100.0, inclusive. You decide how that percentage is calculated and when it changes. For example, if the player earns an achievement simply for discovering a location in your game, then you would simply report the achievement as 100 percent complete the first time you report progress to Game Center. On the other hand, for an achievement like "Capture 10 pirates", your reporting mechanism increments by 10 percent each time the player captures a pirate.  
### See also

- [GameKit.Achievement.GetPercentComplete](GameKitAchievementGetPercentComplete.md)

This function is free to use.

Created 5th November 2018 , last changed 8th November 2018

  
[GameKit.Achievement.Player](GameKitAchievementPlayer.md) - [GameKit.Achievement.SetShowsCompletionBanner](GameKitAchievementSetShowsCompletionBanner.md)

[HTML Version](GameKitAchievementSetPercentComplete.shtml)