Play a bark after delay on conversation end

Announcements, support questions, and discussion for the Dialogue System.
Matt_VoxPrima
Posts: 20
Joined: Tue Apr 22, 2025 3:33 pm

Play a bark after delay on conversation end

Post by Matt_VoxPrima »

Hello!

So my demon is making threat to the main character. Once the conversation ends, I want the main character to play a bark 2 seconds later ("I'd better check on the village right now!"). I've tried multiple attempts, none appear to work.

The one I was most confident was activating a giant bark trigger zone that I could be certain my main character would be inside when the conversation ends.

I don't know, it's like the conversation end message doesn't fire, whatever I put in it.

I tried with the Bark("Message", Player)@3 but didn't work either...

User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play a bark after delay on conversation end

Post by Tony Li »

Hi,

The Dialogue System Trigger that's set to OnConversationEnd is on the Tool_TriggerZone GameObject. This GameObject will only receive the OnConversationEnd message if it's one of the two primary participants. (See Character GameObject Assignments.) Since the player and demon are the primary participants, try moving this Dialogue System Trigger to the demon's GameObject.
Matt_VoxPrima
Posts: 20
Joined: Tue Apr 22, 2025 3:33 pm

Re: Play a bark after delay on conversation end

Post by Matt_VoxPrima »

Oh I see. The Demon is kinda faked, it's not an NPC in the world more a voice in the player's mind. I've put a NPC in the scene and made it invisible, now conversation end fires.

The next part, activating a zone to play a bark on the player, can't seem to figure it out...
There is an "enter" and "exit" but not "while in" so it's not firing.
I've set On Enable on the DST but activating the zone doesn't seem to trigger On Enable...
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play a bark after delay on conversation end

Post by Tony Li »

Hi,

The "demon" GameObject can be an empty GameObject. It doesn't need to be a full character that you've made invisible. Just FYI in case it's helpful.

You shouldn't need a trigger zone. The demon's Dialogue System Trigger set to OnConversationEnd can tell another Dialogue System Trigger to bark after 3 seconds. Try this:

1. Create an empty GameObject named "Delayed Bark" (or whatever you want). Add a Dialogue System Trigger. Leave the Trigger dropdown set to OnUse. Configure it to bark "I'd better check..." on the player.

2. On the demon, set the OnConversationEnd Dialogue System Trigger's Sequence to:

Code: Select all

SendMessage(OnUse,,Delayed Bark)@3
Matt_VoxPrima
Posts: 20
Joined: Tue Apr 22, 2025 3:33 pm

Re: Play a bark after delay on conversation end

Post by Matt_VoxPrima »

Hmm still not working...
It's really the Conversation Actor and Conversation Conversants that must be filled with empty game objects?

The On Conversation End is still not firing...



Edit: I've put the DST with Conversation End on the DemonPlaceholder instead and it's firing but Bark_BadFeeling isn't...
Matt_VoxPrima
Posts: 20
Joined: Tue Apr 22, 2025 3:33 pm

Re: Play a bark after delay on conversation end

Post by Matt_VoxPrima »

And now my main player completely borks when he plays any of his conversation node...
What could I have done to break it so easily?

User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play a bark after delay on conversation end

Post by Tony Li »

Hi,

Here's a pared down example scene:

DS_DelayedBarkExample_2025-04-30.unitypackage

There are 3 important GameObjects:
  • Player: Has a bark UI.
  • Demon: Has 2 Dialogue System Triggers:
    • The first trigger is set to OnStart and plays a conversation.
    • The second trigger is set to OnConversationEnd and runs this sequence:

      Code: Select all

      SendMessage(OnUse,,Delayed Bark GameObject)@3
  • Delayed Bark GameObject: Has a Dialogue System Trigger set to OnUse that plays a bark on the Player.
Matt_VoxPrima
Posts: 20
Joined: Tue Apr 22, 2025 3:33 pm

Re: Play a bark after delay on conversation end

Post by Matt_VoxPrima »

Oh wow thank you for that scene example!

I think I was pretty close... I've completely redone my setup from scratch to mimic yours, with the exception that I'm using a a conversation node instead of text in the bark. Those changes seem ok when applied in your scene.

I'm using a zone trigger to initiate it all, but just to be sure I made the demon a separate game object instead of pointing at the zone trigger.

Oh and we're using a player following dummy at runtime in the scene, since our player character is instantiated in the scene at loading and never placed directly into a scene.

Still, the conversation end is not firing... I've rewatch it ten times, can't really seem to stop an error...

User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play a bark after delay on conversation end

Post by Tony Li »

Hi,

Make sure the Demon GameObject is being used as the Conversation Conversant. This way it will receive the OnConversationEnd message. The surest way to use the Demon as the Conversation Conversant is to assign it to the conversation Dialogue System Trigger's Actions > Start Conversation > Conversation Conversant field.

To confirm that it's being used as the conversant, temporarily turn on logging as explained here:

Matt_VoxPrima
Posts: 20
Joined: Tue Apr 22, 2025 3:33 pm

Re: Play a bark after delay on conversation end

Post by Matt_VoxPrima »

Ok, that fixed the conversation end not firing (confirmed by checking the Watches at runtime)

Now it's the message that is not received by the Bark_Badfeeling game object with the on use conversation bark on it. I don't get it because I send one message OnUse just immediately prior to that when the player steps into the trigger zone and it works fine, but for some reason for conversation end it won't transmit...

We're so close!

Post Reply