Conversation end issue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fr4231
Posts: 20
Joined: Sun Nov 28, 2021 9:44 am

Conversation end issue

Post by fr4231 »

Hello,

Trying to add a bit unique part to the game, where the player can have conversations with him/herself.
All the nodes should play automatically without user interaction (that works by setting the continue to never).
At the end of the conversation, after the last node, I would like to call some events from outside the dialogue system, but it just closes way too quickly and destroys itself before anything could be executed.
What would be the best approach to delay closing of the dialogue system (very specifically the subtitle UI, currently there are only npc subtitles in this specific UI) until all the events are properly executed while keeping the dialogue flow automatic?

For me the very ideal scenario would be to automatically run certain events once the last node was played and once those events were executed close the dialogue system.

Is it possible?

Also I’m using a dialogue UI override component to display a unique UI for these special conversation, but as it is always instanced it seems to make a significant stutter whenever it gets displayed, do you have any recommendations to improve on performance?

Thank you!
fr4231
Posts: 20
Joined: Sun Nov 28, 2021 9:44 am

Re: Conversation end issue

Post by fr4231 »

I think the easiest solution would be an event that could be fired once the last node in the dialogue was played (on conversation end action from the dialogue system events doesn’t seem to work as it fires the event when the dialogue UI is already closed).
User avatar
Tony Li
Posts: 22130
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation end issue

Post by Tony Li »

Hi,

In version 2.2.38, the Override Dialogue UI component has an option to keep the dialogue UI instantiated so it only needs to instantiate it once the first time. (Alternatively, you can put an instance in your scene at runtime and assign the instance to the Override Dialogue UI component.)

For the event, you could add an empty node at the end of the conversation. Set the Title field to something that reminds you of its purpose, such as "Final Actions". In the Sequence field, use SetDialoguePanel(false) to hide the dialogue UI. You can use a scene event or Lua functions or sequencer commands to perform the final actions.
fr4231
Posts: 20
Joined: Sun Nov 28, 2021 9:44 am

Re: Conversation end issue

Post by fr4231 »

Thank you!
Somehow managed to make it work mostly based on your advices.
User avatar
Tony Li
Posts: 22130
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation end issue

Post by Tony Li »

Glad to help!
Post Reply