Detect Dialogue End via script

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ricjonsu098
Posts: 45
Joined: Sat Jul 30, 2016 8:37 am

Detect Dialogue End via script

Post by ricjonsu098 »

Hello, Is it possible to detect when the dialogue ends via script?

Also, Can I make it so that for example, I have a boolean isEnded variable with default value of false, when the dialogue ends, the dialogue will make isEnded true?
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Detect Dialogue End via script

Post by Tony Li »

Hi,

You can add a Dialogue System Events component to the Dialogue Manager and assign events to Conversation Events > On Conversation End such as setting a script variable's value (e.g., isEnded).

Or add a script to the Dialogue Manager with an OnConversationEnd method.

You can also add either of these to a specific participant, such as the player, if you only want to be notified when a conversation involving that participant has ended.

Most of the trigger components can also be configured to fire on conversation start or end. If your isEnded variable is a Lua variable in your dialogue database, you can use a Lua Trigger set to OnConversationEnd. Then use the Lua wizard to set the isEnded variable true.
Post Reply