Page 1 of 1

Dialog System Trigger OnUse()

Posted: Sat Sep 24, 2022 3:08 pm
by Ekta Bhutwala
Hii..

I want to call Dilalog System Trigger OnUse() via script but start with different conversation.

Means i have already set one conversation to be call on OnUse() but when i call OnUse() via script, i want to start diffrent conversaion.

Thanks,.

Re: Dialog System Trigger OnUse()

Posted: Sat Sep 24, 2022 9:57 pm
by Tony Li
Hi,

If you're going to start a conversation from script, you can use a script method directly. You don't have to set up a Dialogue System Trigger. Use DialogueManager.StartConversation():

Code: Select all

DialogueManager.StartConversation("title", actor, conversant);
If you do want to use a Dialogue System Trigger but change the conversation that it starts, set the conversation property first. Example:

Code: Select all

var dsTrigger = GetComponent<DialogueSystemTrigger>();
dsTrigger.conversation = "title";
dsTrigger.OnUse();