Page 1 of 2

How to start and end multiple conversations

Posted: Sun Oct 02, 2022 11:03 am
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?

Re: How to start and end multiple conversations

Posted: Sun Oct 02, 2022 2:01 pm
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.

Re: How to start and end multiple conversations

Posted: Mon Oct 03, 2022 11:18 am
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??

Re: How to start and end multiple conversations

Posted: Mon Oct 03, 2022 11:44 am
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.

Re: How to start and end multiple conversations

Posted: Mon Oct 03, 2022 10:43 pm
by SBSun
Yes, both conversations run each of the two Enemy conversations.

Re: How to start and end multiple conversations

Posted: Tue Oct 04, 2022 7:50 am
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.

Re: How to start and end multiple conversations

Posted: Thu Oct 06, 2022 4:34 am
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.

Re: How to start and end multiple conversations

Posted: Thu Oct 06, 2022 7:47 am
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?

Re: How to start and end multiple conversations

Posted: Thu Oct 06, 2022 8:33 am
by SBSun
A sequence that executes multiple conversations at the same time while executing one conversation cannot be executed.

Re: How to start and end multiple conversations

Posted: Thu Oct 06, 2022 8:46 am
by Tony Li
Can you send a reproduction project to tony (at) pixelcrushers.com?