Story Machine supports achievements and automatically integrates with the achievement system of the host platform, if there is one. Achievements can be used to reward the player for making progress, finding a secret, or completing a challenge.
Achievements come in three formats:
- All or Nothing - The achievement is either completed or not. Most achievements are All or Nothing achievements, and some platforms only support this type.
- Percent - The achievement tracks a value between 0 and 1, and when it reaches 1 it is considered to be completed. Some platforms have a mechanism for displaying a partially-completed achievement.
- Incremental - The achievement tracks a value against a maximum value (“x of y”). When the value reaches the maximum it is considered to be completed.
To create an Achievement, open the
File > Project Settings pane and click
Edit Achievements to open the Achievements pane. Add a new achievement by clicking the
Add Achievement button.
Achievements require a name and a type. Once added, a new Project Variable is added named “Ach: <Achievement Name>”.
Updating and Syncing Achievements
As the game progresses, you can store information about achievement progress in the automatically-created achievement variables. Any time a value of 1.0 or greater is stored in such a variable, the achievement is considered completed. However, the completion will not be recorded, nor sent to the host platform, until you execute the Sync Achievements action. This allows you to delay the achievement notification until it makes sense (for example, at the end of a level).
Sync Achievements will also pull achievement data from the host platform and update the achievement variables accordingly. If the user has completed an achievement on another computer, or has somehow deleted their local save data, this sync refreshes the state of all achievements in Story Machine. It is recommended that you call Sync Achievements when your game starts up.