Use conversations (dialogues) with Bark UI

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ZeroElementGames
Posts: 13
Joined: Tue May 25, 2021 7:18 pm

Use conversations (dialogues) with Bark UI

Post by ZeroElementGames »

Hi there!

I'm currently trying to use barks as UI display with conversations. Like, I have two NPCs, when I trigger a condition, a NPC shows a bark text, and after X time the other NPC shows a bark text. All the dialogues are in a conversation.

I have this set up:
Spoiler
BarkConversation.PNG
BarkConversation.PNG (163.45 KiB) Viewed 252 times
This is the conversation:
Spoiler
BarkConversation_2.PNG
BarkConversation_2.PNG (89.2 KiB) Viewed 252 times
I previously had the BarkOnIdle.cs on "BarkScared Soldier Strawman" gameObject, where the collider for triggering the conversation is.
Spoiler
BarkConversation_3.PNG
BarkConversation_3.PNG (56.54 KiB) Viewed 252 times

But I don't get how this can work.
(Talking about BarkOnIdle.cs) as far as I know, Barker sends messages of OnBarkStart and OnBarkEnd, and Target too. So my guess is that with only one BarkOnIdle.cs and a DialogueActor.cs per NPC should make all work, but it doesn't.


Thanks in advance!
User avatar
Tony Li
Posts: 21959
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use conversations (dialogues) with Bark UI

Post by Tony Li »

When you need to play two or more dialogue entry nodes, I recommend playing a conversation instead of barks. Use a Dialogue System Trigger component instead of Bark On Idle, and select Add Action > Start Conversation.

You can set up an overhead bubble subtitle panel like here: How To: Show Overhead Conversation Bubble Text. Side note: The Dialogue System Extras page has some nicer bubble subtitle panels that use TextMesh Pro (direct download). They're basically the same ones you can see in the Dialogue System + Text Animator + Feel bundle demo.

Or, to use bark UIs, you can add these two components to one of the guards:
  • Bark Dialogue UI
  • Override Dialogue UI -- and assign the Bark Dialogue UI component to it.
ZeroElementGames
Posts: 13
Joined: Tue May 25, 2021 7:18 pm

Re: Use conversations (dialogues) with Bark UI

Post by ZeroElementGames »

Hello Tony,

Thanks for the fast answer!

As always, it was super useful 👌. We've successfully added conversations as barks/bubbles!
User avatar
Tony Li
Posts: 21959
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use conversations (dialogues) with Bark UI

Post by Tony Li »

Glad to help!
Post Reply