How to start and end multiple conversations

Announcements, support questions, and discussion for the Dialogue System.
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

How to start and end multiple conversations

Post by SBSun »

I learned how to start a conversation at the same time by asking multiple questions.

The first picture is the Dialogue Manager UI situation before the conversation starts, and the second picture is when the two Enemys start talking to themselves.

If you look at the picture, 4 Basic Standard UI prefabs were created, is this normal?

Picture 3 is an error that occurs when trying to run self-talk again after self-talk is over. I think it's probably because the Basic Standard UI Prefab doesn't exist in the 4th picture, is that right?

Lastly, you said that if you want to end a conversation you want when conversations are running at the same time, you can close it using DialogueManager.instance.activeConversations. How do I tell the conversation I want to end?
Attachments
4.PNG
4.PNG (6.17 KiB) Viewed 29556 times
3.PNG
3.PNG (44.11 KiB) Viewed 29556 times
2.PNG
2.PNG (56.63 KiB) Viewed 29556 times
1.PNG
1.PNG (6.9 KiB) Viewed 29556 times
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to start and end multiple conversations

Post by Tony Li »

Hi,
SBSun wrote: Sun Oct 02, 2022 11:03 amIf you look at the picture, 4 Basic Standard UI prefabs were created, is this normal?
The NPC's Override Dialogue UI component should create a temporary dialogue UI only during the conversation. Since you're starting 2 conversations, there should only be 2 temporary dialogue UIs, plus the regular dialogue UI that the Dialogue Manager GameObject creates for other conversations.
SBSun wrote: Sun Oct 02, 2022 11:03 amPicture 3 is an error that occurs when trying to run self-talk again after self-talk is over. I think it's probably because the Basic Standard UI Prefab doesn't exist in the 4th picture, is that right?
It sounds like maybe the Override Dialogue UI component isn't cleaning up the dialogue UI for some reason. Maybe the conversation isn't finishing? You can also try adding a Canvas to the NPC, and add an instance of the Basic Standard Dialogue UI to the NPC's Canvas. Then assign this instance to the NPC's Override Dialogue UI component.
SBSun wrote: Sun Oct 02, 2022 11:03 amLastly, you said that if you want to end a conversation you want when conversations are running at the same time, you can close it using DialogueManager.instance.activeConversations. How do I tell the conversation I want to end?
After you start the conversation, you can record DialogueManager.instance.activeConversation. This property points to the active conversation record that was just started.

Otherwise, you can loop through the DialogueManager.instance.activeConversations list to find the record whose actor or conversant property matches the conversation's participants.
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: How to start and end multiple conversations

Post by SBSun »

Thank you for answer!

I solved it by adding a Basic Standard Dialogue UI instance to the NPC.

However, sometimes when I start a conversation, a bug occurs that the UI cannot be activated. Photo 1 is when the picture is normal, picture 2 is when the UI is not activated.

And the Sequence of the Start node is executed, but Delay(5) is set for the End nodes, but it is not executed.

Is it because of MinSubtitle Seconds of Dialogue System Controller??
Attachments
4.PNG
4.PNG (44.1 KiB) Viewed 29551 times
3.PNG
3.PNG (76.82 KiB) Viewed 29551 times
2.PNG
2.PNG (183.76 KiB) Viewed 29551 times
1.PNG
1.PNG (167.42 KiB) Viewed 29551 times
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to start and end multiple conversations

Post by Tony Li »

Are the participants separate in both conversations?

For example, if an active conversation is using Enemy1, then another conversation should not try to involve Enemy1 until the first conversation is done.
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: How to start and end multiple conversations

Post by SBSun »

Yes, both conversations run each of the two Enemy conversations.
Attachments
캡처.PNG
캡처.PNG (22.37 KiB) Viewed 29546 times
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to start and end multiple conversations

Post by Tony Li »

Is this script on separate GameObjects -- Enemy1 and Enemy1(1)?

Have you tried this:

1. Add a Canvas child GameObject to each enemy.
2. Add a Basic Standard Dialogue UI prefab to each Canvas.
3. Add an Override Dialogue UI component to each enemy and assign the Basic Standard Dialogue UI from #2.
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: How to start and end multiple conversations

Post by SBSun »

Yes, I did all three. I'm curious why the codes written in the Sequence now don't run normally.

Delay and WaitForMessage functions are not executed and the conversation ends after 2 seconds due to Min Subtitle Seconds.
Attachments
3.PNG
3.PNG (51.37 KiB) Viewed 29515 times
2.PNG
2.PNG (82.92 KiB) Viewed 29515 times
1.PNG
1.PNG (79.25 KiB) Viewed 29515 times
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to start and end multiple conversations

Post by Tony Li »

Let's identify whether this is a problem with the sequence or with multiple conversations.

Does this happen if you only run one conversation at a time?
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: How to start and end multiple conversations

Post by SBSun »

A sequence that executes multiple conversations at the same time while executing one conversation cannot be executed.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to start and end multiple conversations

Post by Tony Li »

Can you send a reproduction project to tony (at) pixelcrushers.com?
Post Reply