Page 1 of 1
End Dialogue/Close Conversation
Posted: Sun Nov 22, 2020 10:12 pm
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.
Re: End Dialogue/Close Conversation
Posted: Sun Nov 22, 2020 10:23 pm
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.
Re: End Dialogue/Close Conversation
Posted: Sun Nov 22, 2020 10:34 pm
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?
Re: End Dialogue/Close Conversation
Posted: Mon Nov 23, 2020 9:50 am
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?
Re: End Dialogue/Close Conversation
Posted: Mon Nov 23, 2020 5:30 pm
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.
Re: End Dialogue/Close Conversation
Posted: Mon Nov 23, 2020 6:14 pm
by Tony Li
Where is the background GameObject in the dialogue UI's hierarchy? Is it inside the dialogue UI's Dialogue Panel?
Re: End Dialogue/Close Conversation
Posted: Sat Nov 28, 2020 2:11 pm
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
Thank you
Re: End Dialogue/Close Conversation
Posted: Sat Nov 28, 2020 3:22 pm
by Tony Li
No worries; I'm glad you got to the bottom of the issue!