Conversation Endless loop

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
s0lt4r
Posts: 7
Joined: Tue Aug 18, 2015 9:07 pm

Conversation Endless loop

Post by s0lt4r »

Hello all,

I'm currently using a keyboard to navigate my dialogue options. I can select and go through my entire dialogue tree.

Once I get to the end and press the pre defined "Submit" key, the conversation starts over or the GUI goes away immediately.

I'm using the JRPG Dialogue UI that comes with the Dialogue System.

I'd appreciate any help on this, thanks.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation Endless loop

Post by Tony Li »

Hi,

It sounds like it might be a trigger issue, not a GUI issue. How are you starting the conversation? Are you using a Conversion Trigger or other similar trigger component? If so, can you please describe how you've set it up?

Are you using the JRPG Dialogue UI in Prefabs/Legacy Unity GUI Prefabs or in Prefabs/Unity UI Prefabs?

Also, what version of the Dialogue System are you using? (Window > Dialogue System > Help > About, or check Assets/Dialogue System/_README.txt)
s0lt4r
Posts: 7
Joined: Tue Aug 18, 2015 9:07 pm

Re: Conversation Endless loop

Post by s0lt4r »

Tony Li wrote:Hi,

It sounds like it might be a trigger issue, not a GUI issue. How are you starting the conversation? Are you using a Conversion Trigger or other similar trigger component? If so, can you please describe how you've set it up?

Are you using the JRPG Dialogue UI in Prefabs/Legacy Unity GUI Prefabs or in Prefabs/Unity UI Prefabs?

Also, what version of the Dialogue System are you using? (Window > Dialogue System > Help > About, or check Assets/Dialogue System/_README.txt)
Thanks for the response.

I'm using a Conversation Trigger with "On Use" as the parameter.
I'm using the JRPG Dialogue UI in Prefabs/Unity UI Prefabs
I'm using Version 1.5.4

I agree, it seems like a new conversation triggers before the current one finishes. I've got a hunch that some Lua conditions may be necessary here, but I'm unsure of where to start.

I apologize if I'm asking obvious questions, I just purchased the Dialogue System recently and I'm still trying to get my bearings. Thanks in advance for your help.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation Endless loop

Post by Tony Li »

Here are a couple of things to check:

1. Temporarily set the Dialogue Manager's Debug Level to Info. This will log a lot of information to the Console view. But it may give you insight into what's happening. When you end the conversation, you may see a line like "Dialogue System: Ending conversation." followed by a line "Dialogue System: Starting conversation 'x'..." if our guess is true.

2. How are you sending "OnUse" to the Conversation Trigger? For example, are you using the Dialogue System's Selector component like the Feature Demo scene does? If so, is the "Submit" button the same as whatever mechanism sends "OnUse"? In other words, maybe the same keypress that closes the first conversation is also being used to start the second conversation.

3. Do you need to disable components on the player and/or NPC during conversations? These steps are documented here: How to Set Up the Player and How to Set Up NPCs. You can look at the Player GameObject in the Feature Demo for an example.

If none of that helps, please feel free to email the editor.log file or an example project that demonstrates the issue to tony (at) pixelcrushers.com. I'll be happy to take a look.
s0lt4r
Posts: 7
Joined: Tue Aug 18, 2015 9:07 pm

Re: Conversation Endless loop

Post by s0lt4r »

Tony Li wrote:Here are a couple of things to check:

1. Temporarily set the Dialogue Manager's Debug Level to Info. This will log a lot of information to the Console view. But it may give you insight into what's happening. When you end the conversation, you may see a line like "Dialogue System: Ending conversation." followed by a line "Dialogue System: Starting conversation 'x'..." if our guess is true.

2. How are you sending "OnUse" to the Conversation Trigger? For example, are you using the Dialogue System's Selector component like the Feature Demo scene does? If so, is the "Submit" button the same as whatever mechanism sends "OnUse"? In other words, maybe the same keypress that closes the first conversation is also being used to start the second conversation.

3. Do you need to disable components on the player and/or NPC during conversations? These steps are documented here: How to Set Up the Player and How to Set Up NPCs. You can look at the Player GameObject in the Feature Demo for an example.

If none of that helps, please feel free to email the editor.log file or an example project that demonstrates the issue to tony (at) pixelcrushers.com. I'll be happy to take a look.
1. It looks like "Dialogue System: Ending conversation." never actually happens so that explains why the GUI just craps out.
2. I'm using the Dialogue System's Selector component. My "Submit" button is used to send the "OnUse" Trigger as well as select dialogue options. I'd like to be able to initiate and continue conversation using the same button if possible.
3. I had my own control set-up for the project I'm working on so I haven't looked at disabling their components. I've just been using the NPC and Player Wizards to add the Dialogue System Components. I'm not sure the issue is with the pre-existing components, though, as no other component uses the "Submit" button.

I'm guessing it's an issue with the "OnUse" button being the same as my Submit button. I'm just not sure how to go about fixing it without it feeling unintuitive.

Any thoughts?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation Endless loop

Post by Tony Li »

Hmm, if "Dialogue System: Ending conversation." never appears in the log, then it shouldn't start a new conversation. The Dialogue System allows only one conversation to run at a time. If you try to run a second conversation, it will log a warning "Dialogue System: Can't start conversation 'x'. Another conversation is already active."

Does your conversation perhaps have a circular link back to the START node?
s0lt4r
Posts: 7
Joined: Tue Aug 18, 2015 9:07 pm

Re: Conversation Endless loop

Post by s0lt4r »

No, looking at the conversation, it all flows to the end.
This may be easier if I just send a sample project. Give me a few and I'll whip one up.

Edit:

Sent a test project to your email. Thanks for looking at it.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation Endless loop

Post by Tony Li »

Thanks for sending the project. The issue was with ProximitySelector. When the 'A' button was pressed to end the conversation, the ProximitySelector also grabbed the button press and used it to trigger the conversation again. It's fixed in this version:

ProximitySelector_2015-08-19.unitypackage

Also, I don't know if this was an artifact of preparing the example scene, but the Player had two copies of some components such as Set Component Enabled On Dialogue Event and Proximity Selector. Make sure you only have one of each on the Player. You can also add Player Controller to the On Start and On End sections of Set Component Enabled On Dialogue Event; this will prevent the player from moving around during the conversation.
s0lt4r
Posts: 7
Joined: Tue Aug 18, 2015 9:07 pm

Re: Conversation Endless loop

Post by s0lt4r »

Awesome!

The new component works great. I also added my player controller to the Start and End events, so that's working too.

Was it something I was doing or was it an issue with the Selector?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation Endless loop

Post by Tony Li »

You were doing everything right. It was an issue with the ProximitySelector.
Post Reply