cant seem to make bark work

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mroyusa
Posts: 6
Joined: Sun Nov 22, 2015 11:57 am

cant seem to make bark work

Post by mroyusa »

I followed the tutorial, but when i get close to the npc he still does not bark. am i missing something i have 3 components on the npc bark trigger, unity bark ui and usage, i set the conversation, i run the game get close to the npc and nothing happens,


also i get a warning no event system adding one message,

I am on windows 10 unity version 5.2.2
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: cant seem to make bark work

Post by Tony Li »

Hi Martin,

Your Bark Trigger is set to OnUse. This means it won't bark until it receives an "OnUse" message, typically from the player's Selector or Proximity Selector component.

If instead you want the NPC to bark when the player enters its trigger collider, try these steps:

1. Add a trigger collider to the NPC. For example, add a Sphere Collider and tick the Is Trigger checkbox. Adjust its radius to the distance where the NPC should bark when the player approaches (e.g., 2.0).

2. On the Bark Trigger, set the Trigger dropdown to OnTriggerEnter.

3. On the Bark Trigger, expand Condition > Accepted Tags. Set the Size to 1, and enter "Player" (without quotes) in the Element 0 field.

If it's still not working after this, temporarily set the Dialogue Manager's Debug Level to Info. Then play again. This will log a lot of information to the console. As you approach the NPC, watch for any clues in the console.
mroyusa
Posts: 6
Joined: Sun Nov 22, 2015 11:57 am

Re: cant seem to make bark work

Post by mroyusa »

i added a sphere collider but it stops the player from entering the collider so i guess on trigger enter does not work because of that, i just want the npc to say stuff when i get close to them

What components need to go on my player?

what components need to go on all my npc?

Weird how the sphere collider makes me collide but not able to enter it, maybe that's normal.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: cant seem to make bark work

Post by Tony Li »

On the Sphere Collider, tick Is Trigger. If you already did that and it's still not working, I'll bet you're using a player controller like Realistic FPS Prefab. If that's the case, put the Sphere Collider and Bark Trigger on a child GameObject, and set the child GameObject's Layer to Ignore Raycasts.

If none of that helps, please feel free to send me an example project that demonstrates the issue. I'll be happy to take a look.
Post Reply