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

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Peter Drake
Posts: 37
Joined: Tue May 17, 2022 3:49 pm

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

Post 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 935 times
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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?
Peter Drake
Posts: 37
Joined: Tue May 17, 2022 3:49 pm

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

Post 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.
Peter Drake
Posts: 37
Joined: Tue May 17, 2022 3:49 pm

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

Post 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?
Peter Drake
Posts: 37
Joined: Tue May 17, 2022 3:49 pm

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

Post 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.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
Post Reply