Listed as: NUI - Achievements
Adds a flexible and easy-to-use achievements system to your game.
FEATURES:
- Configurable achievements of various types (standard, progress)
- Choose from preset icons (thanks games-icons.net !) or use your own
- Configurable Achievement Unlocked UI (toast notification) including duration and screen position
- Achievement view screen, so players can see their achievement progress
- Mark achievements as secret so their info isn’t revealed until they are unlocked
- AchievementUnlockScript allows you to easily add achievement unlocking to basic actions such as interact, collision, triggerEnter and triggerExit
HOW TO USE:
- Drag the “NUI Achievements” template onto your User
- Add an “Achievement” script to the “Achievements” script folder for each achievement you want in your game (some examples are included)
- Use the “UnlockAchievement” API to unlock an achievement via ID, or “IncrementAchievementProgress” to increment a progress-type achievement (see AchievementAPIExample script)
ACHIVEMENT UNLOCK SCRIPT:
- Add the “AchievementUnlockScript” to any entity you want to add achievement interaction to
- Enter the unique ID of the achievement you want to affect
- Specify which action you want it to activate on (interact, collision, triggerEnter or triggerExit)
- Select whether you want it to unlock an achievement, or increment the progression
- Specify whether it can only be used once (e.g. “Interact with 3 buttons”, you wouldn’t want someone to just interact with the same button three times to unlock it)
- The script also contains two generic functions for unlocking and progressing an achievement for use with custom events
API:
- UnlockAchievement( achievementID ) - Unlock a paritcular achievement
- ncrementAchievementProgress( achievementID, amount ) - Increment the progression of a progress-type achievement
CREDITS:
- All preset icons are used from https://games-icons.net under the CC-BY license
- Adam for making sure my code isn’t terrible
- You