OnConversationStart/End calls with different parameter

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

OnConversationStart/End calls with different parameter

Post 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??
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnConversationStart/End calls with different parameter

Post 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.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: OnConversationStart/End calls with different parameter

Post 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?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnConversationStart/End calls with different parameter

Post 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.
Post Reply