[Solved] Bark System Question.

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

[Solved] Bark System Question.

Post by Japtor »

Hi,

Question related to the bark system... Is it possible to maintain the NPC "Bark UI" meanwhile the player is inside the trigger, and the only condition to make it disappear is when the player is out of it?

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

Re: Bark System Question.

Post by Tony Li »

Hi,

Yes.

1. On your bark UI, tick Wait Until Sequence Ends:

Image

2. Set the bark's Sequence to WaitForMessage(Left):

Image

(The message can be anything. I just chose "Left" arbitrarily.)

3. Add another trigger that runs OnTriggerExit. Configure it to send the sequencer message "Left":

Image

If you don't want to use another trigger in step #3 above, you can add a small script to the NPC instead. Something like:

Code: Select all

using UnityEngine;

public class SequencerMessageOnTriggerExit : MonoBehaviour {

    private void OnTriggerExit(Collider other)
    {
        PixelCrushers.DialogueSystem.Sequencer.Message("Left");
    }
}
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

Re: Bark System Question.

Post by Japtor »

Hi Tony,

Thanks for your answer!

What if in "part 2" the "Bark Source" is set to "Conversation" instead of "Text"? It seems in "Conversation" there is no "Bark Text Sequence". I use as "Bark Source" -> "Conversation" because I have three Dialogue -> Conversation -> Nodes with different text that I want them to be executed randomly.

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

Re: Bark System Question.

Post by Tony Li »

Hi,

If "Bark Source" is set to "Conversation", it will use the dialogue entry node's Sequence.
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

Re: Bark System Question.

Post by Japtor »

Hi,

Oh true! I didn't remember that part, haha!

Thanks for your reply, It works perfectly now! :)
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark System Question.

Post by Tony Li »

Great! Happy to help!
Post Reply