Hello again,
Here's one way to do it:
1. In your dialogue database, add a new Boolean variable named "Achievement_TooLazy".
2. Create a UI Image named "Achievement_Image_TooLazy".
3. On the line "Come on! It's too early..." set the Script and Sequence fields to:
- Sequence:
Code: Select all
SetActive(Achievement_Image_TooLazy);
required SetActive(Achievement_Image_TooLazy,false)@2
- Script:
Code: Select all
Variable["Achievement_TooLazy"] = true;
ShowAlert("Achievement Unlocked: Too Lazy for First Day")
The variable will remember whether the player has earned the achievement or not.
In the example above, the image appears for 2 seconds, and then it disappears.
If you want the image to always be onscreen, even after loading saved games, change the steps to these:
3. On the line "Come on! It's too early..." set the Script and Sequence fields to:
- Sequence:
Code: Select all
SetActive(Achievement_Image_TooLazy)
- Script:
Code: Select all
Variable["Achievement_TooLazy"] = true;
ShowAlert("Achievement Unlocked: Too Lazy for First Day")
4. Add a
Persistent Active Data component to the Dialogue Manager. Assign Achievement_Image_TooLazy as the Target. Add a Condition > Lua Conditions element:
Code: Select all
Variable["Achievement_TooLazy"] == true