Dialog System Trigger OnUse()

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Dialog System Trigger OnUse()

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

Re: Dialog System Trigger OnUse()

Post 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();
Post Reply