Page 1 of 2
Automatic bark conversations
Posted: Tue Feb 14, 2023 10:15 am
by kimosabe
Hi,
I'm trying to accomplish 2 NPCs having an automatic conversation using bark UI. (The game also includes conversations using a dedicated dialogue UI with responses.)
The problem is, if I choose 'Bark' from the DialogueSystemTrigger, I have to sequence the whole conversation myself with OnBarkEnd. What I would like instead is for them to play out the whole conversation without any user interaction.
To achieve this I've setup my characters this way:
And the dialogue like this:
Which works perfect, unless for the fact that when the conversation starts, the dialogue UI also pops up and I have to click in order for their conversation to progress. How could I change it so it automatically goes through the conversation?
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 10:38 am
by Tony Li
Hi,
Add an Override Dialogue UI component and a Bark Dialogue UI component to one of the NPCs. Assign the Bark Dialogue UI to the Override Dialogue UI's UI field.
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 11:23 am
by kimosabe
Tony Li wrote: ↑Tue Feb 14, 2023 10:38 am
Hi,
Add an Override Dialogue UI component and a Bark Dialogue UI component to one of the NPCs. Assign the Bark Dialogue UI to the Override Dialogue UI's UI field.
Thank you for the response, it does prevent the UI from opening up, but now it only display the first dialogue message from the conversation. Any idea why that is?
My gameobjects are setup like this:
With the 2 new components being added to the one with the dialogue trigger:
When I run the game, the npc with these components attached says the first line from the conversation but after that nothing else.
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 12:37 pm
by Tony Li
Hi,
Does this conversation require continue button clicks?
You can set the Dialogue Actors' Subtitle Panel Number and Menu Panel Number back to Default since you're using Bark Dialogue UI.
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 12:41 pm
by kimosabe
Tony Li wrote: ↑Tue Feb 14, 2023 12:37 pm
Hi,
Does this conversation require continue button clicks?
You can set the Dialogue Actors' Subtitle Panel Number and Menu Panel Number back to Default since you're using Bark Dialogue UI.
No, it does not require continue button. I would like for the conversation to play out automatically.
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 3:37 pm
by Tony Li
If you set the Dialogue Actors' Subtitle Panel Number and Menu Panel Number back to Default since you're using Bark Dialogue UI, does it work the way you want? Alternatively, assign the Basic Standard Dialogue UI prefab to the Override Dialogue UI component.
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 5:00 pm
by kimosabe
Tony Li wrote: ↑Tue Feb 14, 2023 3:37 pm
If you set the Dialogue Actors' Subtitle Panel Number and Menu Panel Number back to Default since you're using Bark Dialogue UI, does it work the way you want? Alternatively, assign the Basic Standard Dialogue UI prefab to the Override Dialogue UI component.
If it set them both back to default, and use the 'override dialogue UI' and 'bark dialogue UI' I get this result:
If I set the subtitle panel number to 'use bark UI', w/o any overrides scripts. It works but my normal dialogue UI comes up and I have to click to manually progress the dialogue
My goal is to have the second result but w/o any UI popping up, just having an automatic dialogue play out between 2 characters.
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 5:17 pm
by Tony Li
Try these settings:
NPCs' Dialogue Actor components:
- Subtitle Panel Number: Use Bark UI
- Menu Panel Number: Default (doesn't really matter; it's not used in this case)
Remove Bark Dialogue UI.
Add Override Dialogue UI. Assign Basic Standard Dialogue UI prefab to Override Dialogue UI's UI field.
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 5:31 pm
by kimosabe
Unfortunately it still won't continue past the first message
Is there a method I can call from a custom C# script that just continues the conversation? That way I can just have it continue the conversation every X seconds until it's done.
Re: Automatic bark conversations
Posted: Tue Feb 14, 2023 6:43 pm
by Tony Li
You can manually continue the conversation, but it might be best to get to the bottom of what's going on.
To manually continue after 3 seconds, set the dialogue entry node's Sequence field to: Continue()@3
To get to the bottom of the issue, here are two approaches:
1. Instead of using a bark UI, use an overhead subtitle panel:
How To: Overhead Conversation Bubble Text
You'll still want to use an Override Dialogue UI and assign Basic Standard Dialogue UI.
2. Or check the bark UI's StandardBarkUI component. If it's configured to wait for a continue button press, untick the option. Also check the Dialogue Manager GameObject's Subtitle Settings > Continue Button dropdown and the conversation's properties (Menu > Conversation Properties in the Dialogue Editor window). Make sure the conversation's properties aren't overriding the Continue Button dropdown to require continue button clicks.