Many characters in one dialogue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
SilverMoon17
Posts: 9
Joined: Tue Oct 17, 2023 2:06 pm

Many characters in one dialogue

Post by SilverMoon17 »

Is there any way to create a dialogue with 3 or more characters using the Dialogue System for Unity? I tried to do this using variables and barks. But I don't know how to control when bark ends. Here's what I tried

Code: Select all

public void SayTimeToSleep(Action OnComplete = null)
    {
        DialogueLua.SetVariable("TimeToSleep", true);
        
        StartCoroutine(CheckBarkConditions());

        IEnumerator CheckBarkConditions()
        {
            while (DialogueManager.IsConversationActive && DialogueManager.CurrentActor == this.transform)
            {
                yield return null;
            }
            
            OnComplete?.Invoke();
        }
    }
This doesn't work either, I tried

Code: Select all

public void OnBarkEnd(Transform actor){}
But it is called too early, almost immediately after bark starts. Is there some way to make a small dialogue between 3 and more characters?
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Many characters in one dialogue

Post by Tony Li »

Hi,

If a dialogue exchange involves more than one dialogue entry, use a conversation instead of a bark.

You can assign two main characters to the conversation's Actor and Conversant:

multiple1.png
multiple1.png (7.13 KiB) Viewed 130 times

And then assign other characters to individual dialogue entries:

multiple2.png
multiple2.png (14.06 KiB) Viewed 130 times

See also: Character GameObject Assignments
SilverMoon17
Posts: 9
Joined: Tue Oct 17, 2023 2:06 pm

Re: Many characters in one dialogue

Post by SilverMoon17 »

How can I then change the conversation for the actors or how can I organize it all correctly?
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Many characters in one dialogue

Post by Tony Li »

Hi,

I'm not sure what you mean. Can you give a specific example, even if it's just hypothetical?
Post Reply