Page 1 of 1

[SOLVED] Infinity conversation loop

Posted: Mon Jul 20, 2015 6:21 am
by alfonso
Hi

In the game i'm working you can switch between two characters, one is active by default in the start of the scene and the other one starts disable, when you switch to the other character the active toggle to disable and the other toggle to active, when i talk with the default goes fine but if i talk to npc with the one how start disable, when the conversation ends goes to the first node and the conversation start again.
it is any relation the fact that starts disable and need to force some thing in the core of Dialogue System?

Thanks for the help

Re: Infinity conversation loop

Posted: Mon Jul 20, 2015 10:51 am
by Tony Li
Hi Alfonso,

No, I don't think it's because one of the characters starts disabled.

Maybe the Conversation Trigger is firing again at the end of the conversation.

Please temporarily set the Dialogue Manager's Debug Level to Info. Then play the game again.

Do you see this (below)?

Dialogue System: Starting conversation...
(conversation plays)
(conversation restarts from beginning)


Or do you see this:

Dialogue System: Starting conversation...
(conversation plays)
Dialogue System: Starting conversation...
(conversation restarts from beginning)

In the first case, the conversation never ends. It follows a link back to the beginning.

In the second case, the conversation ends, and then a trigger starts it again.

Re: Infinity conversation loop

Posted: Mon Jul 20, 2015 11:23 am
by alfonso
Hi the second one,

i have something like that:

PlayerManager
-Character 1 > CustomProximitySelector
-Character 2 > CustomProximitySelector

as i said, starts with character 1 active and the Character 2 disable, them you can active both but can move with one,
with Charcter 1 i dont have any problem works fine, but if i try to speak with Character 2 goes to the loops (i try to disable character 1 but goes to the loops too)
if i have the two character actives and go with the character 1 speak fine and finish the conversation but with the character 2 not.

thanks for the help :)

PD: the trigger of the npc is Conversation Trigger, with the Trigger in OnUse.

Re: Infinity conversation loop

Posted: Mon Jul 20, 2015 11:53 am
by Tony Li
Hi,

Can you send an example project to tony (at) pixelcrushers.com?

If you can't send an example project, please post screenshots of the Inspector views of each character and the Conversation Trigger(s).

Does it loop forever, or only twice?

If you start with Character 1 disabled and Character 2 active, does it work fine?

Re: Infinity conversation loop

Posted: Tue Jul 21, 2015 3:44 am
by alfonso
ok i think i fixed.

the problem was the scripts execution order, it seen that the character who start in enable put it in the top of the "Script Execution Order" the CustomProximtySelector (and work fine) but when i active the other one, i think that it change the order execution or what ever... (i dont know very well how works the "Script Execution Order" at runtime and with the same script with enabled and disabled gameObjects)

the fix is to put CustomProximitySelector in "Script Execution Order" before the "Default Execution" and enabled or disabled its execute always is at the same time.

Thanks for your time :)

Re: [SOLVED] Infinity conversation loop

Posted: Tue Jul 21, 2015 9:08 am
by Tony Li
Sounds good. If you notice any other issues, just let me know!