Page 1 of 1

Event on conversation start/end

Posted: Mon Jan 18, 2016 5:06 pm
by Nick92
Hi!

Is there possible to check when the conversation starts and when the conversation ends?
I've tried to assign the ConversationLogger script to the game object, but OnConversationStart and OnConversationEnd methods are not called. Maybe I'm doing something wrong. Could you please to describe the workflow with how to listen this events?

P.S.: Is there a pure way to check when the conversation is active? (I need to block keyboard input during the dialogue).

Thanks in advance!

Re: Event on conversation start/end

Posted: Mon Jan 18, 2016 9:54 pm
by Tony Li
Hi,

OnConversationStart and OnConversationEnd are sent to the Dialogue Manager and both participants. (The Script Messages page is a handy reference to which GameObjects receive which messages.) If you've added the ConversationLogger script to one of the participants and it's not working, then that participant's GameObject probably isn't being assigned as the actor or conversant when the conversation starts. You may need to assign it to the Actor or Conversant field in your Conversation Trigger (or similar trigger).

You can also check the DialogueManager.IsConversationActive bool property.