Showing alert messages
-
- Posts: 195
- Joined: Mon Jul 01, 2019 1:21 pm
Showing alert messages
Hey Tony, I'm having trouble getting alert messages to show. I'm using a customised version of the Visual Novel template Dialogue UI, which contains an alert panel. I then added ShowAlert("Hello"); to the script field of a node, but nothing is showing. Should that work, or am I missing some steps?
Thanks!
Thanks!
Re: Showing alert messages
Hi,
You may need to tick the Dialogue Manager GameObject's Display Settings > Alert Settings > Allow Alerts During Conversations.
You may need to tick the Dialogue Manager GameObject's Display Settings > Alert Settings > Allow Alerts During Conversations.
-
- Posts: 195
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Showing alert messages
Just checked that, but it's still not showing up. These are my alert settings.
Re: Showing alert messages
Hi,
Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then play the scene and the conversation. When you get to the line where the alert should have appeared, review the logs in the Console window. You should see a line like:
Dialogue System: Lua(ShowAlert("Hello"))
If not, make sure the ShowAlert() command is in the Script field, not the Conditions or Sequence field.
If you do see that line in the Console window, make sure your alert panel is sized and positioned properly so that it will be onscreen when showing alerts.
Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then play the scene and the conversation. When you get to the line where the alert should have appeared, review the logs in the Console window. You should see a line like:
Dialogue System: Lua(ShowAlert("Hello"))
If not, make sure the ShowAlert() command is in the Script field, not the Conditions or Sequence field.
If you do see that line in the Console window, make sure your alert panel is sized and positioned properly so that it will be onscreen when showing alerts.
-
- Posts: 195
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Showing alert messages
Hey Tony. I figured it out, it was related to an issue I had a while ago where I had to adjust the Hide state on the Dialogue Panel to avoid the UI disappearing.
I just updated DS and it's all working now (and the disappearing UI bug has gone away, so all good )
I just updated DS and it's all working now (and the disappearing UI bug has gone away, so all good )
Re: Showing alert messages
Hi,
Great! I'm glad you got it all working. Thanks for the update.
Great! I'm glad you got it all working. Thanks for the update.
-
- Posts: 195
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Showing alert messages
One more quick question - when it comes to showing achievements, how do I get the alert message to display "Unlocked: [achievement name]"? The current Unlocked Text is just "Unlocked:".
Re: Showing alert messages
What's the actual ShowAlert() that you're using. For example, does it look like this?
- Script: ShowAlert("Unlocked: Martial Weapons Skill")
- Script: ShowAlert("Unlocked: [var=unlockedSkill]")
-
- Posts: 195
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Showing alert messages
For achievement-related alerts, I removed ShowAlert() in the script field so that it wouldn't show every time you run the node. Instead, I'm using UnlockAchievement("Completed Level 1"); which is making an alert appear, but the alert only says "Unlocked: " instead of "Unlocked: Completed Level 1". I'm guessing that's because it's just taking the text from the Unlocked Text field here.
Re: Showing alert messages
Hi,
Is Achievements your own script?
Where is the UnlockAchievement() Lua function defined? Is it from a third-party integration?
Is Achievements your own script?
Where is the UnlockAchievement() Lua function defined? Is it from a third-party integration?