Page 1 of 1

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

Posted: Sun Oct 15, 2023 4:14 pm
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!

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

Posted: Sun Oct 15, 2023 6:43 pm
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?

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

Posted: Sun Oct 15, 2023 9:12 pm
by Aelcyx
Hi, it's the dropdown for On Conversation End. In the Actions subsection, it calls OnExecute() UnityEvent.

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

Posted: Mon Oct 16, 2023 8:31 am
by Tony Li
Would you please post a screenshot? I'm still not sure which OnConversationEnd you're referring to.

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

Posted: Tue Oct 17, 2023 1:39 am
by Aelcyx
Sorry for the delay. Here's a screenshot. While I inherit from the DialogueSystemTrigger, I don't touch the actions.

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

Posted: Tue Oct 17, 2023 8:22 am
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?

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

Posted: Wed Oct 18, 2023 1:01 am
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.

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

Posted: Wed Oct 18, 2023 8:57 am
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.

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

Posted: Thu Oct 19, 2023 12:33 am
by Aelcyx
That is all very useful information! I'll conduct some investigations.