Page 1 of 1

Receive OnConversationStart on various game Objects

Posted: Wed Nov 25, 2020 11:29 am
by NotVeryProfessional
I have a scene object that wants to respond to OnConversationStart events. The documentation for the "Dialogue System Events" component says to attach it to the Dialog Manager, but my gameobject is a scene object (that needs references to other scene objects, so I can't move it out of the scene).

Simply attaching the "Dialogue System Events" component does nothing. I suspect it doesn't subscribe to the events. So I might be missing an additional component to attach?


Or maybe there is another solution:

I want to disable/enable some objects in my scene whenver I am in a conversation. Reacting to the OnConversationStart and End events seemed like the natural approach.

Re: Receive OnConversationStart on various game Objects

Posted: Wed Nov 25, 2020 11:40 am
by NotVeryProfessional
From the documentation it seems I simply don't get those events sent unless I'm a participant. Makes sense.

So I need to hook into the C# events? Is that the correct approach?

Re: Receive OnConversationStart on various game Objects

Posted: Wed Nov 25, 2020 12:31 pm
by Tony Li
Yes. If you can't put a Dialogue System Events or an OnConversationStart script method on one of the participants or the Dialogue Manager, hook into the C# events. That's what they're there for.

(Refer to this reply, too.)

If you need to activate or deactivate objects only when a specific dialogue entry node plays, you can use scene events if you prefer.

Re: Receive OnConversationStart on various game Objects

Posted: Wed Nov 25, 2020 2:42 pm
by NotVeryProfessional
Got it and it works, thanks.

Yes, I figured out how to trigger things from a dialog, but in this case I'm using a quest state. Essentially, when entering the scene, if this quest is active, activate those gameobject.

Re: Receive OnConversationStart on various game Objects

Posted: Wed Nov 25, 2020 2:55 pm
by Tony Li
Got it. BTW, you might also have been able to use a Dialogue System Trigger for that. Set the Dialogue System Trigger to OnStart. Set the Conditions > Quest Conditions to require that the quest is in a specific state. Then select Add Action > Set GameObjects Active/Inactive.