Page 1 of 1

Detect Dialogue End via script

Posted: Thu Aug 11, 2016 2:31 am
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?

Re: Detect Dialogue End via script

Posted: Thu Aug 11, 2016 8:36 am
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.