Dialogue System Trigger - OnConversationStart/End
Posted: Sat Feb 24, 2024 9:36 pm
Working in 2D, I have an NPC with a dialogue system trigger set to On Use, and performs Start Conversation. I have set the Actor to the player, and the Conversant to this NPC.
I also added another two dialogue system triggers for OnConversationStart and OnConversationEnd to this same NPC gameobject, and im executing a UnityEvent (calling a function in a script) on these, but its never actually firing. The conversation starts fine, just trying to get these events to trigger specifically on start and end as well.
I viewed the debug info for DialogueManager, and the actor and conversant are properly set to Player and my NPC.
The only way I can get it to trigger is if I switch the NPC to the Conversation Actor spot, and move the Player to the Conversant spot. But that causes the conversation to enter an infinite loop when I press the submit/continue button on the last conversation node - it just restarts as soon as I press it.
Screenshot attached.
I also added another two dialogue system triggers for OnConversationStart and OnConversationEnd to this same NPC gameobject, and im executing a UnityEvent (calling a function in a script) on these, but its never actually firing. The conversation starts fine, just trying to get these events to trigger specifically on start and end as well.
I viewed the debug info for DialogueManager, and the actor and conversant are properly set to Player and my NPC.
The only way I can get it to trigger is if I switch the NPC to the Conversation Actor spot, and move the Player to the Conversant spot. But that causes the conversation to enter an infinite loop when I press the submit/continue button on the last conversation node - it just restarts as soon as I press it.
Screenshot attached.