End Dialogue/Close Conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

End Dialogue/Close Conversation

Post by boz »

Is there a sequence or function to close the dialogue window?

I have an issue where I use a sequence to load a new scene but on the next scene the dialogue background is just sitting there.
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: End Dialogue/Close Conversation

Post by Tony Li »

The dialogue window closes when the conversation ends. It sounds like your conversation is not ending. If the player normally much click a continue button to advance the conversation, try adding the sequencer command "Continue()" to the last node's Sequence. Example:

Code: Select all

required LoadLevel(New Scene);
Continue()
The 'required' keyword guarantees that LoadLevel() runs even if Continue() happens to close the conversation first.
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: End Dialogue/Close Conversation

Post by boz »



I agree, it's odd that the conversation doesn't seem to want to end. I've added the "required" bit and it still remains open on the next scene. I can open the next scene on it's own and no dialogue box appears.

Maybe I need to put some sort of delay timer on the load?
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: End Dialogue/Close Conversation

Post by Tony Li »

Hi,

Keep a Dialogue Editor window open on that conversation while you play. When it gets to that node, the Dialogue Editor will show the node in green. Does the node stay green, indicating that the conversation is still stuck on it?

You can also temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. After the node loads the level, check the Console for a line like:

Dialogue System: Ending conversation.

This will indicate that the conversation ended properly and isn't still stuck on the node for some reason.

Is there anything unusual about the dialogue UI? Is it an override? Or is the a regular dialogue UI assigned to the Dialogue Manager's Dialogue UI field?
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: End Dialogue/Close Conversation

Post by boz »

Howdy,

The node doesn't get stuck green as intended. End Dialogue plays.

Here's the console (ignore the music warning message, that's my own unrelated thing):


When I look in the hierarchy, it's only showing the background, nothing else. I can deactivate that background and everything is flowing as intended.

I just tested turning off the fade-in to see if that did anything, but the background still shows up.

Thanks for any help, I only ask because this seems bizarre to me. I can probably just rig something up to check and see if that background is open and close it.
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: End Dialogue/Close Conversation

Post by Tony Li »

Where is the background GameObject in the dialogue UI's hierarchy? Is it inside the dialogue UI's Dialogue Panel?
boz
Posts: 76
Joined: Mon Oct 19, 2020 8:59 pm

Re: End Dialogue/Close Conversation

Post by boz »

That did the trick!

I didn't know it was supposed to be in there, but in retrospect that makes a lot of sense. I don't know why I would've moved it outside of the the dialogue panel so I must've done it on accident at some point.



Can't believe how long it took me to figure out such a simple thing :oops:

Thank you :D
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: End Dialogue/Close Conversation

Post by Tony Li »

No worries; I'm glad you got to the bottom of the issue!
Post Reply