Page 1 of 1

OnConversationEnd Delegate

Posted: Fri Mar 25, 2016 8:14 am
by beit
Dear pixelcrushers team,

First thanks a lot for your Dialogues and Quest system, it's of great quality and we love it!
I have a question about on conversation start/End notifications. I have understood and was able to receive notifications on a script of an actor that is involved in a conversation successfully.
Now I would like to be able to receive a OnConversationEnd event on a script that isn't an actor. Is there a way to do this purely by code, I have seen the component you offer SendMessage... Set.... Those are nice but I would like to be able to handle directly from code, can I Do this?
I can't seem to find a way from the doc/forums.

Best,

Enrico

Re: OnConversationEnd Delegate

Posted: Fri Mar 25, 2016 10:24 am
by Tony Li
Hi Enrico,

Thanks for using the Dialogue System!

The script messages are also sent to the Dialogue Manager GameObject.

A new component, Dialogue System Events, will be included in the next release. You can download an advance copy here: DialogueSystemEvents_20160312.unitypackage. If you add it to the Dialogue Manager, you can assign methods similarly to how you set up UI Buttons' OnClick() events.

Re: OnConversationEnd Delegate

Posted: Fri Mar 25, 2016 2:59 pm
by beit
Hey,

wow, that sound like exactly what I was looking for.
Thanks a lot I'll try this out.

Have a good one.

Re: OnConversationEnd Delegate

Posted: Fri Mar 25, 2016 3:10 pm
by Tony Li
Glad to help! :-)

Re: OnConversationEnd Delegate

Posted: Thu May 05, 2016 5:50 am
by beit
Hey Tony,

your component works really good, I have created an interface on top of it to send notification via code around the app and everything looks working good so far.
I am debugging a weird situation and I just notice the component you share with me is sending double notification at every conversation end ( I haven't check the other methods like onconversationstart if they behave the same).
The thing is the current conversant and current actor are the same so I don't understand what is going on, is it a known problem?

Best,

Enrico

Re: OnConversationEnd Delegate

Posted: Thu May 05, 2016 9:04 am
by Tony Li
Hi Enrico,

If the actor and conversant are the same, the Dialogue System will not send the "OnConversationStart" or "OnConversationEnd" message twice. However, it does broadcast the message to the GameObject and all of its children. It also broadcasts it to the Dialogue Manager GameObject.

Is it possible that you have two components that are listening for OnConversationEnd, one of them perhaps on a child GameObject?

If you've ticked the Dialogue Manager's Preload Resources checkbox, the Dialogue Manager will simulate the start and end of a conversation as part of the preload process. So at the very beginning of the game you may see another OnConversationStart and OnConversationEnd. If you don't want this behavior, untick Preload Resources.