[solved] Character Player -> Bark problem (duplicates).

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

[solved] Character Player -> Bark problem (duplicates).

Post by Japtor »

Hi,

I have set up the conversation system between an NPC and the Player Character between "Usable components" and their "Dialogue System Trigger". Now, what I would like is that the Player Character could Bark when it reaches a specific object in the scene (also in usable) instead of the normal conversation between NPC-Player.

What I have tried is to create inside the Player Character a Dialogue Actor, where I have set the "Bark UI" with the "Basic Standard Bark UI" and changed the "Bark UI Offset". Then, I have created a new NPC (Object). I attached it a "Box Collider", a "Usable Component", a "Dialogue System Trigger" where I have put, inside the trigger section, "On Use" and added a "Bark Action" with the respective "Bark Conversation" and the Player Character as the "Barker". Through Play mode, when I reach the new NPC (Object) and press a button, the bark appears but duplicated (one upper than the other).

What am I doing wrong? Is there a better option to do this?

Thanks!
Last edited by Japtor on Sat Aug 18, 2018 2:46 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Character Player -> Bark problem (duplicates).

Post by Tony Li »

Hi,

Your approach is correct. If you want a Usable object to bark, add a Dialogue System Trigger with a Bark action. If you want it to play an interactive conversation, add a Dialogue System Trigger with a Converation action.

Does your scene have two cameras? Sometimes games will have a separate UI camera that renders the UI layer. The bark UI is a world space canvas that's on the UI layer. If your main camera also renders the UI layer, and if they are in different positions, you could see two renderings of the bark UI.

Here's another thing to check: When this problem occurs, pause the game and check the NPC. Make sure it only has one bark UI instance.

If none of that helps, please feel free to send a project that reproduces the issue to tony (at) pixelcrushers.com. I'll be happy to take a look.
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

Re: Character Player -> Bark problem (duplicates).

Post by Japtor »

Hi,

Yeah! It was the second camera. I will try to fix it.

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

Re: Character Player -> Bark problem (duplicates).

Post by Tony Li »

Sounds good. You can set one of the cameras to not render the UI layer, or you can change the bark UI to a different layer that only one camera renders.
Post Reply