Page 1 of 1

Changing the bark UI background in a dialogue.

Posted: Sat Jun 24, 2023 11:26 am
by ds2497
Hi there,

I'm currently using Bark for both idle and dialogue situations. However, I'm wondering what I should do if I want to have the idle barks with background A and the dialogue barks with background B. Can you provide some guidance on this?

Thanks!

Re: Changing the bark UI background in a dialogue.

Posted: Sat Jun 24, 2023 11:42 am
by Tony Li
Hi,

If by "dialogue situations" you mean conversations (versus one-off barks), what if you use the bark UI only for barks, and use an overhead subtitle panel for conversations? (How To: Show Overhead Conversation Bubble Text)

If that's not what you're looking for, you could add a script to your bark UI's main panel. In OnEnable(), check DialogueManager.isConversationActive. If it's true, use the conversation background image. Otherwise use the bark background image.

Re: Changing the bark UI background in a dialogue.

Posted: Mon Jun 26, 2023 10:20 am
by ds2497
I have BarkOnIdle and Bark UI for regular dialogues, which is why I want to change the background so that players can differentiate between when NPCs are talking directly to them and when NPCs are just barking to themselves. Anyway, with DialogueManager.isConversationActive, it's working! However, I do have another question.

If I want to create a generic "Goodbye" dialogue, how can I accomplish this using the "Link to another dialogue" feature? In the "Goodbye" dialogue, I have "Common Npc" as the actor. When the actor "Soldier A" finishes the last line in the "Test A" dialogue and links to the "Goodbye" dialogue, there is an actor mismatch which causes the barking UI to not appear. How can I fix this?

Re: Changing the bark UI background in a dialogue.

Posted: Mon Jun 26, 2023 11:32 am
by Tony Li
Hi,

The solution in that case is to assign Common Npc to the first conversation, too. Since you're providing Soldier A to the Dialogue System Trigger / DialogueManager.StartConversation() method, it will use Soldier A in place of Common Npc in the first conversation and the goodbye conversation.

Alternatively, you can do a little scripting on the change to update the ConversationModel's conversation conversant info. If you need to do this, let me know and I'll describe the process.

Re: Changing the bark UI background in a dialogue.

Posted: Mon Jun 26, 2023 12:25 pm
by ds2497
I'm still working on it, meanwhile I have a quick question: it seems like link to another dialogue feature will trigger On Conversation Response Menu on the Dialogue System Events component, am I right? I know this might sound weird, but this is my test result.

Re: Changing the bark UI background in a dialogue.

Posted: Mon Jun 26, 2023 2:53 pm
by ds2497
So I've figured it out myself. The Conversation Response Menu gets triggered because the Actor of the Start Node inside the Goodbye dialogue is the player, thus the player's response is considered existing.

Thanks, Tony. You are the best!

Re: Changing the bark UI background in a dialogue.

Posted: Mon Jun 26, 2023 3:31 pm
by Tony Li
Glad you figured it all out!