> For the complete documentation index, see [llms.txt](https://assetstore.essentialkit.voxelbusters.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://assetstore.essentialkit.voxelbusters.com/features/game-services/playmaker/use-cases/use-case-2-achievement-unlock.md).

# Achievement Unlock (Report Progress)

## Goal

Report achievement progress and optionally show the native Achievements UI.

## Prerequisite

Make sure the player is authenticated first. Use `use-case-1-auth-bootstrap.md` for a safe startup flow (don’t rely on `GameServicesAuthenticate.successEvent` as “authenticated”).

## Actions used

* `GameServicesReportAchievementProgress`
* `GameServicesGetReportAchievementProgressError` (on failure)
* `GameServicesShowAchievementsUI` (optional)

## Variables

* `achievementId` (String) e.g. `"first_victory"`
* `percentComplete` (Float) 0–100

## Flow

1. When the achievement condition is met, go to `ReportAchievementProgress`.
2. State: `ReportAchievementProgress`
   * Action: `GameServicesReportAchievementProgress`
   * Inputs: `achievementId`, `percentComplete` (use `100` to unlock)
   * Events:
     * `successEvent` → (optional) `ShowAchievementsUI` or back to gameplay
     * `failureEvent` → `GetReportAchievementProgressError` (log/ignore)
3. State: `ShowAchievementsUI` (optional)
   * Action: `GameServicesShowAchievementsUI`

## Notes

* Incremental achievements: report `25`, `50`, … until `100`.
* If the player is not authenticated, `GameServicesReportAchievementProgress` fails immediately; decide whether to silently skip or prompt login via your auth bootstrap.
