Alert after conversation ends

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Eldritch_Horror
Posts: 28
Joined: Sun May 28, 2023 8:30 pm

Alert after conversation ends

Post by Eldritch_Horror »

How do I trigger an alert after a conversation has ended? A condition has been met, and I want an alert to trigger after the conversation in that branch ends, so the alert menu is gone.
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Alert after conversation ends

Post by Tony Li »

Hi,

If you set the "Alert" variable -- for example, in a dialogue entry node's Script field:
  • Dialogue Text: "We have a winner!"
  • Script: Variable["Alert"] = "Goal achieved: win carnival game"
at the end of the conversation the Dialogue System will check this variable. If it's set, it will show the text as an alert and then set the Alert variable back to a blank string.

Alternatively, if you want to show an alert right away in the middle of a conversation, tick the Dialogue Manager's Alert Settings > Allow Alerts During Conversations. Then use the ShowAlert("message") Lua function in a Script field.
Post Reply