Page 1 of 1

OnConversationStart/End calls with different parameter

Posted: Mon Oct 12, 2020 3:57 pm
by fkkcloud
Hi,

I have

Code: Select all

public void OnConversationStart()
for some arbitrary classes

and

Code: Select all

public void OnConversationStart(Transform)
for other arbitrary classes,

Sometimes one of the other only works, is that because I have ProximitySelector for above in the GameOjbect hierarchy somewhere and DialogueSystemTrigger for the below??

Re: OnConversationStart/End calls with different parameter

Posted: Mon Oct 12, 2020 5:12 pm
by Tony Li
Hi,

If you want the Dialogue System to automatically call your method, it must be:

Code: Select all

public void OnConversationStart(Transform)
The Dialogue System will only call these special methods on specific GameObjects. See: Script Messages.

Re: OnConversationStart/End calls with different parameter

Posted: Mon Oct 12, 2020 5:44 pm
by fkkcloud
I have a arbitrary class in the same gameobject with DialogueActor only.
It seems like it does not call OnConversationStart(Transform), what is minimum requirement to be called?

Document says that "Participants, Dialogue Manager & children" will receive the message. Would DialogueActor not be Participants?

Re: OnConversationStart/End calls with different parameter

Posted: Mon Oct 12, 2020 8:27 pm
by Tony Li
The participants it refers to are the GameObjects used as the primary actor and conversant.

If you have assigned GameObjects to the Dialogue System Trigger's Conversation Actor and Conversation Conversant fields, it will use those GameObjects.

Otherwise it will look for a GameObjects with Dialogue Actor components that match the conversation's Actor and Conversant fields.

If it doesn't find those, it will use other GameObjects as described in Character GameObject Assignments.