How to make Achievements?
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
How to make Achievements?
Hello, It's me again.
Can Dialogue System can trigger achievements?
For example, The character suppose to wake up early for him to go to school.
The achievement entitled as "Too Lazy for First Day."
The player will pick from this choices.
If the player picks the "fix the bed." No achievement.
If the player picks the "Come on! It's too early, lets take a nap for five minutes."
The achievement will trigger and shows "Achievement Unlocked: "Too Lazy for First Day.""
I want also to attach an Image for the achievement to make the player appreciate it.
Have a good day!
Can Dialogue System can trigger achievements?
For example, The character suppose to wake up early for him to go to school.
The achievement entitled as "Too Lazy for First Day."
The player will pick from this choices.
If the player picks the "fix the bed." No achievement.
If the player picks the "Come on! It's too early, lets take a nap for five minutes."
The achievement will trigger and shows "Achievement Unlocked: "Too Lazy for First Day.""
I want also to attach an Image for the achievement to make the player appreciate it.
Have a good day!
Re: How to make Achievements?
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:
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:
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")
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")
Code: Select all
Variable["Achievement_TooLazy"] == true
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: How to make Achievements?
Thanks!
I have a question.
On the main menu, there is an achievement button. If the player clicks the achievement button, it will show the achievements earned. It is also possible to show the achievements earned on a panel? Currently, I have a panel for achievements. Still I don't know how to show the achievements on the panel.
I have a question.
On the main menu, there is an achievement button. If the player clicks the achievement button, it will show the achievements earned. It is also possible to show the achievements earned on a panel? Currently, I have a panel for achievements. Still I don't know how to show the achievements on the panel.
Re: How to make Achievements?
Hi,
Continue to use Dialogue System variables to remember what achievements the player has earned.
Add OnPersistentActiveData components to the panel, one for each achievement image. Set the Trigger to OnEnable. Assign an achievement image to each component's Target. Set the Condition > Lua Condition to check the achievement's Dialogue System variable.
Continue to use Dialogue System variables to remember what achievements the player has earned.
Add OnPersistentActiveData components to the panel, one for each achievement image. Set the Trigger to OnEnable. Assign an achievement image to each component's Target. Set the Condition > Lua Condition to check the achievement's Dialogue System variable.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: How to make Achievements?
Am I doing right?
The achievement earned must show on this panel, but the achievement is not showing.
The achievement earned must show on this panel, but the achievement is not showing.
Re: How to make Achievements?
It looks like it's almost there. I'll send you an example later today.
DId you assign an image to Achievement_Image_TooLazy?
DId you assign an image to Achievement_Image_TooLazy?
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: How to make Achievements?
Thanks a lot!
Yes, I put the Achievement_Too_Lazy under the game object named "Achievements."
Yes, I put the Achievement_Too_Lazy under the game object named "Achievements."
Re: How to make Achievements?
Is a valid image file assigned to Achievement_Too_Lazy?
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: How to make Achievements?
I put a blank image inside the panel and on the game object, yes its a valid image.
Re: How to make Achievements?
Okay, thanks. I should have an opportunity in a couple hours to put together an example for you.