After switching scenes, dialog conversations will not play

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mikeasci
Posts: 10
Joined: Fri Jan 07, 2022 5:41 pm

After switching scenes, dialog conversations will not play

Post by mikeasci »

I am having a problem with conversations when switching between scenes. After playing conversations is one scene and then loading a new scene, conversations no longer play. The dialog UI does not show up and there is no text or audio. If I play the new scene by itself, the conversations play perfectly. Here is a screenshot of the Debug Info:
Screenshot 2022-01-27 143814.jpg
Screenshot 2022-01-27 143814.jpg (98.54 KiB) Viewed 258 times
I have then set "Allow Simultaneous Conversations" to true in the other settings section. After this, upon entering the 2nd scene, the conversation plays the first node fine. After pressing "continue" to go on to the next node, the dialog UI pops up briefly showing the text and then closes. The audio plays completely through for that node. However, since the dialog UI went away, the player cannot advance because there is no "continue" button to press. Here is the debug info for this situation:
Screenshot 2022-01-27 143921.jpg
Screenshot 2022-01-27 143921.jpg (24.65 KiB) Viewed 258 times
with allow multiple convesations.jpg
with allow multiple convesations.jpg (209.43 KiB) Viewed 258 times
Any idea what could be causing this?
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: After switching scenes, dialog conversations will not play

Post by Tony Li »

Conversations don't automatically end when you change scenes.

I see an 'Ending conversation' log in your Console screenshot, but I don't know if it corresponds to the scene change. Make sure your conversation ends when you change scenes. If you're requiring continue button clicks, you'll probably want to use the "Continue()" sequencer command in the last node. For example:
  • Dialogue Text: "Take me to Scene 2."
  • Sequence:

    Code: Select all

    required LoadLevel(Scene 2);
    Continue()
The 'required' keyword in front of LoadLevel() guarantees that the command will run even if Continue() kicks off first and ends the conversation. Since neither command has any timing information, they'll both try to run immediately, and it's not guaranteed which one will run first -- hence the 'required' keyword.

Also, unless you really need simultaneous conversations, I recommend unticking the checkbox. That way you'll get a handy warning in the Console if you unintentionally try to start a conversation when another is running.
mikeasci
Posts: 10
Joined: Fri Jan 07, 2022 5:41 pm

Re: After switching scenes, dialog conversations will not play

Post by mikeasci »

That was the problem. Your solution worked perfectly. Thanks!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: After switching scenes, dialog conversations will not play

Post by Tony Li »

Glad I could help! :-)
Post Reply