Display LCB Bark without Duration

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
WaWa
Posts: 16
Joined: Tue May 21, 2024 6:03 am

Display LCB Bark without Duration

Post by WaWa »

Hi Tony

I searched for a similar topic but couldn't find it. and I followed this youtube Dialogue System for Unity 2.x Interaction Tutorial https://youtu.be/ZxppOvEwOaI?t=214

So I wanted to create an exclamation mark using Bark + LCB for NPC when Actor approach (so as a sign that we can interact with NPCs). There only one Bark with message : (!!)
I was successful in putting it. However, the bark depends on the duration.

Here when Actor enters an NPC's collision , the NPC displays the Bark. However, it disappears due to duration.

1. Therefore, I wanted Bark to continue showing as long as the actor inside in the NPC's collision. When the Actor exits the NPC Collision, the bark disappears immediately. How we do it?

Or, is there another way besides using the Bark system?
Thank you
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Display LCB Bark without Duration

Post by Tony Li »

Hi,

Here are two options:

1. Instead of a bark, add the "!!" as a GameObject above the character's head, and deactivate the GameObject.
  • If you're using a Proximity Selector to interact with characters, add a Usable component. In the OnSelect() event, activate the GameObject. In OnDeselect(), deactivate the GameObject.
  • If you're not using a Proximity Selector, add a Trigger Event component. In the OnTriggerEnter() event, activate the GameObject. In OnTriggerExit(), deactivate the GameObject.
  • If you want to animate the appearance of the "!!", you can set up an animator with "show" and "hide" states. Instead of activating the GameObject, leave it active and configure the events to play the animator states.
2. Or tick the bark UI's Wait Until Continue Button checkbox, but don't add a continue button to the bark UI. Continue to use your current setup to show the LCB bark. Use the Usable's OnDeselect() or Trigger Event's OnTriggerExit() to call the bark UI's Hide() method.
User avatar
WaWa
Posts: 16
Joined: Tue May 21, 2024 6:03 am

Re: Display LCB Bark without Duration

Post by WaWa »

Hi Tony,

ohh that is good idea for no 1.
I will try both options.

Thank you for the response!
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Display LCB Bark without Duration

Post by Tony Li »

Glad to help!
Post Reply