How to make a conversation between two NPCs use the bark UI

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
gnomecommand
Posts: 2
Joined: Sun Apr 05, 2020 7:12 pm

How to make a conversation between two NPCs use the bark UI

Post by gnomecommand »

Hello,

Is there a simple way to make it so a conversation between two NPCs (user input spawns the next chat bubble) will display the text as the bark UI chat bubbles?

We looked around the forum and found a few topics about something similar to this but they all used older versions of the Dialogue System and did not seem to work when tried.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to make a conversation between two NPCs use the bark UI

Post by Tony Li »

Hi,

I'll explain two approaches. For your scenario, I recommend the second one.

The first way is to add two components to one of the NPCs: Bark Dialogue UI and Override Dialogue UI. Assign the Bark Dialogue UI component to the Override Dialogue UI. Make sure both NPCs have bark UIs. The catch with this approach is that barks don't wait for user input.

The second way lets you wait for user input by using custom subtitle panels that look like bark UIs.
  • Add an instance of the Bubble Template Standard UI Subtitle Panel to each NPC. Add a continue button, and assign it to the Standard UI Subtitle Panel component's Continue Button field. You don't have to assign anything to the button's OnClick() event.
  • Add a Dialogue Actor component to each NPC. Set the Dialogue Actor's Dialogue UI Settings > Subtitle Panel Number to Custom, and assign the instance of Bubble Template Standard UI Subtitle Panel to the Custom Subtitle Panel field.
  • Your Dialogue Manager still needs a Standard Dialogue UI (e.g., the Basic Standard Dialogue UI that's assigned to the Dialogue Manager prefab) even though it won't display either NPC's subtitles through its subtitle panels. So leave it assigned to the Dialogue Manager.
gnomecommand
Posts: 2
Joined: Sun Apr 05, 2020 7:12 pm

Re: How to make a conversation between two NPCs use the bark UI

Post by gnomecommand »

Hey, thanks for the fast response, we implemented the second suggestion you gave and it works perfectly!

Thanks
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to make a conversation between two NPCs use the bark UI

Post by Tony Li »

Great! Glad to help.
Post Reply