Page 1 of 1

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

Posted: Thu Aug 16, 2018 4:12 am
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!

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

Posted: Thu Aug 16, 2018 9:44 am
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.

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

Posted: Fri Aug 17, 2018 5:12 am
by Japtor
Hi,

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

Thanks! :)

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

Posted: Fri Aug 17, 2018 8:59 am
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.