Page 1 of 1

Dialogue System: Another conversation is already active. Not starting 'New Conversation 1'.

Posted: Mon May 30, 2022 8:19 pm
by Peter Drake
I'd like conversations to start when the player walks up to an NPC. This is almost working perfectly. However, I am getting this warning:

Code: Select all

Dialogue System: Another conversation is already active. Not starting 'New Conversation 1'.
UnityEngine.Debug:LogWarning (object)
PixelCrushers.DialogueSystem.DialogueSystemController:StartConversation (string,UnityEngine.Transform,UnityEngine.Transform,int) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:901)
PixelCrushers.DialogueSystem.DialogueManager:StartConversation (string,UnityEngine.Transform,UnityEngine.Transform,int) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueManager.cs:446)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:DoConversationAction (UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:950)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:Fire (UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:695)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart (UnityEngine.Transform,UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:677)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart (UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:663)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:OnTriggerEnter (UnityEngine.Collider) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:523)
I'm pretty sure the trigger isn't going off more than once, since I have another script that prints a message whenever the player enters the trigger collider, and that's only going off once.

Ideas?
Screen Shot 2022-05-30 at 5.18.46 PM.png
Screen Shot 2022-05-30 at 5.18.46 PM.png (162.38 KiB) Viewed 982 times

Re: Dialogue System: Another conversation is already active. Not starting 'New Conversation 1'.

Posted: Mon May 30, 2022 8:37 pm
by Tony Li
Hi Peter,

Unless you have two Dialogue System Triggers that are being triggered at the same time, you probably do have two colliders that are hitting the NPC's trigger collider. Does your player prefab have any additional colliders on child objects?

Re: Dialogue System: Another conversation is already active. Not starting 'New Conversation 1'.

Posted: Mon May 30, 2022 8:46 pm
by Peter Drake
I don't see any, but I do notice a "2" next to message printed in the console by my other script. It turns out "collapse" was turned on.

So ... if that's happening twice, maybe I do have two colliders. I'll keep looking.

Re: Dialogue System: Another conversation is already active. Not starting 'New Conversation 1'.

Posted: Mon May 30, 2022 8:49 pm
by Peter Drake
No, wait, there's only one trigger collider. I can tell because when I disable it I don't get any messages from OnTriggerEnter methods.

Is this another one of those zany situations where the trigger is somehow entered twice?

Re: Dialogue System: Another conversation is already active. Not starting 'New Conversation 1'.

Posted: Mon May 30, 2022 8:57 pm
by Peter Drake
Aha! There was a trigger collider on the colliding Player object. I'm not sure why, but when I disabled it the problem went away and no new problems appeared, so I'll declare victory.

Re: Dialogue System: Another conversation is already active. Not starting 'New Conversation 1'.

Posted: Mon May 30, 2022 9:13 pm
by Tony Li
Glad you found it! When a GameObject (e.g., player) has a trigger collider and it collides with another GameObject (e.g., NPC), both GameObjects get an OnTriggerEnter[2D] message. So the player's regular collider was sending OnTriggerEnter[2D] to the player and NPC, and the player's trigger collider was sending OnTriggerEnter[2D] to the player and NPC.