Page 1 of 1

Triggering a Response on Trigger Exit

Posted: Mon Jul 09, 2018 4:00 pm
by pegassy
I am going with bubble menu UI for my dialogue style after some deliberation. I noticed now that the number of choices I have for the character at a time can bloat the screen too much, so I am looking for ways to reduce options.

One idea is to discard the "end dialogue" button (goodbye, I should go now, see you, etc) options by simply having the character say the content of that dialogue just by walking out of the trigger zone. Is there a way a particular dialogue option can be triggered if the character just exits the trigger? (Again, credit goes to Oxenfree for inspiration towards more genuine dialogue)

Re: Triggering a Response on Trigger Exit

Posted: Mon Jul 09, 2018 11:52 pm
by Tony Li
Hi,

You may prefer to handle it manually.

However, it's possible to handle it using Dialogue System Triggers and no scripting. Here's how:

On your regular Dialogue System Trigger, tick Stop Conversation On Trigger Exit.

Add another Dialogue System Trigger set to OnConversationEnd that runs a one-node conversation (e.g., "Goodbye").

At this point, when the player leaves the trigger zone, the player will always say "Goodbye", even if the conversation ended normally. To fix this:

1. Add a Boolean variable, for example named "Said Bye".

2. In the normal conversation's <START> node's Script field, set "Said Bye" to false.

3. In the final nodes of the normal conversation, use the Script field to set "Said Bye" to true.

4. In the Dialogue System Trigger that's set to OnConversationEnd, add a Condition > Lua Condition that "Said Bye" is false.

Re: Triggering a Response on Trigger Exit

Posted: Tue Jul 10, 2018 2:57 pm
by pegassy
That is a pretty brilliant solution. Thank you for the direction.

Re: Triggering a Response on Trigger Exit

Posted: Tue Jul 10, 2018 3:09 pm
by Tony Li
Glad to help!