Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Aelcyx
Posts: 9
Joined: Wed Jan 19, 2022 1:50 am

Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Aelcyx »

Hi!

I think I encountered a bug. Hopefully there's an easy fix or I did something dumb!

I have several dialogue zones in a scene that are triggered by various events. After one triggers, it does a few things, like activating UI and adding a quest. Then there is a pause where the user does an action. After that action finishes, it seems to execute the OnConversationEnd trigger of the *first* dialogueZone, which is already disabled. I checked and the current dialogueZone does not have the events from the previous (e.g., a legacy copy).

Is there a way to release the events from a buffer or to prevent this from happening?

Thank you! Love the asset - incredible work!
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Tony Li »

Hi,

Thanks!

I'm trying to get a clearer picture of the situation. Does your scene have any Dialogue System Triggers whose Trigger dropdowns are set to OnConversationEnd? Is that what's triggering? Or are you referring to a Dialogue System Events component's OnConversationEnd() UnityEvent? Or something else?
Aelcyx
Posts: 9
Joined: Wed Jan 19, 2022 1:50 am

Re: Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Aelcyx »

Hi, it's the dropdown for On Conversation End. In the Actions subsection, it calls OnExecute() UnityEvent.
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Tony Li »

Would you please post a screenshot? I'm still not sure which OnConversationEnd you're referring to.
Aelcyx
Posts: 9
Joined: Wed Jan 19, 2022 1:50 am

Re: Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Aelcyx »

Sorry for the delay. Here's a screenshot. While I inherit from the DialogueSystemTrigger, I don't touch the actions.
Attachments
DialogueDebug.PNG
DialogueDebug.PNG (54.72 KiB) Viewed 683 times
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Tony Li »

Hi,

Thanks. The OnConversationEnd event will occur on the Dialogue Manager GameObject and the primary actor and conversant GameObjects of the conversation that just finished. For more info about primary actor & conversant GameObjects, please see: Character GameObject Assignments.

Is this Dialogue System Trigger on one of those GameObjects?
Aelcyx
Posts: 9
Joined: Wed Jan 19, 2022 1:50 am

Re: Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Aelcyx »

Ah, thank you for sharing that. The trigger is childed to the conversant. I have the Conversant set and have this issue. However, the Actor is not set since the actor is spawned in. Should I write a script to manually set the actor? Or should I unset the Conversant? Thanks.
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Tony Li »

No need to set the actor. As described in the link above, if the Conversation Actor or Conversation Conversant fields are unassigned, they'll automatically use the GameObject that corresponds to the actor assignment in the conversation. For example, if the conversation's Actor dropdown is set to Player, and if the Dialogue System Trigger's Conversation Actor field is blank, it will look for a GameObject with a Dialogue Actor component set to Player.

Let's identify which GameObjects are being used as the actor and conversant. As shown in the Logging & Debugging tutorial:



set Debug Level to Info. The "OnConversationEnd" event will be sent to the "Dialogue System: Starting conversation..." participants and all of their children.
Aelcyx
Posts: 9
Joined: Wed Jan 19, 2022 1:50 am

Re: Previous DialogueZone's OnConversationEnd TriggerEvents are activating after subsequent DialogueZone finishes

Post by Aelcyx »

That is all very useful information! I'll conduct some investigations.
Post Reply