Conversation getting stuck when conditions not meet.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Noodle_Soup
Posts: 12
Joined: Mon Nov 20, 2017 11:38 pm

Conversation getting stuck when conditions not meet.

Post by Noodle_Soup »

Hello everyone,

I'm having some sort of trouble with my dialogues. Right now I'm working with this:

Image

So... The problem. From the START state you have two possible ways, both require a specific condition, which is also different for both of them, when none of these conditions are meet the dialogue gets stuck at the START. I'm quite puzzled because I found this:

"A conversation ends if there are no currently-valid links". — Tony Li
(viewtopic.php?f=3&t=1119&p=5959&hilit=not+ending#p5959)

I thought conversations ended automatically if this was the case. To avoid this problem I created a third state at the START that works as END in case none of the other conditions are meet.

Is this the only way to avoid that? Thanks for taking your time reading.

Best regards.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation getting stuck when conditions not meet.

Post by Tony Li »

Hi,

If you temporarily set the Dialogue Manager's Debug Level to Info, does the Unity editor's Console window provide any clues?

You should see something like this:

Dialogue System: Starting conversation 'conversation' actor=X conversant=Y
Dialogue System: Lua( Variable["Actor"]='name'; Variable["Conversant"]='name' )
Dialogue System: Lua( return condition )
Dialogue System: Block on False Link (actor): ID=#:# 'text' Condition='condition'
Dialogue System: Lua( return condition )
Dialogue System: Block on False Link (actor): ID=#:# 'text' Condition='condition'

where the last 4 lines are for the dialogue entries whose conditions aren't true.

Does your <START> node have a Sequence? It should be "None()".

Are you using a continue button?

Please feel free to send an example to tony (at) pixelcrushers.com. I'll be happy to take a look.
Noodle_Soup
Posts: 12
Joined: Mon Nov 20, 2017 11:38 pm

Re: Conversation getting stuck when conditions not meet.

Post by Noodle_Soup »

Tony Li wrote: Fri Jan 05, 2018 9:02 am You should see something like this:

Dialogue System: Starting conversation 'conversation' actor=X conversant=Y
Dialogue System: Lua( Variable["Actor"]='name'; Variable["Conversant"]='name' )
Dialogue System: Lua( return condition )
Dialogue System: Block on False Link (actor): ID=#:# 'text' Condition='condition'
Dialogue System: Lua( return condition )
Dialogue System: Block on False Link (actor): ID=#:# 'text' Condition='condition'

where the last 4 lines are for the dialogue entries whose conditions aren't true.

Does your <START> node have a Sequence? It should be "None()".

Are you using a continue button?
Yes to all of that. Every START remains untouched and I'm using Continue Button as "Always". The lasf four lines are as follows (Block on False Link as you mentioned):

Image
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation getting stuck when conditions not meet.

Post by Tony Li »

If there are no valid entries from START, the conversation will not actually start. So it won't send OnConversationStart and OnConversationEnd messages, if that's what you're not seeing. Is the problem that you're not receiving OnConversationEnd messages, or that it's actually somehow opening the dialogue UI and hanging there?

If you want to check if the conversation has valid entries before trying to start it, you can check DialogueManager.ConversationHasValidEntry().
Noodle_Soup
Posts: 12
Joined: Mon Nov 20, 2017 11:38 pm

Re: Conversation getting stuck when conditions not meet.

Post by Noodle_Soup »

Wow, fixed.

You were absolutely right, I tried this and now it works, the conversation ends an keeps going with the next one:

Image

Thanks a lot Tony. C:
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation getting stuck when conditions not meet.

Post by Tony Li »

Glad to help!
Post Reply