Announcements, support questions, and discussion for the Dialogue System.
-
boz
- Posts: 76
- Joined: Mon Oct 19, 2020 8:59 pm
Post
by boz »
Howdy,
Is there a way to do something in script like, say...
Code: Select all
DialogueSystem.TriggerDialogue("NameOfConversation");
I tried this but I'm not sure how to use it correctly:
Code: Select all
public DialogueDatabase database; //Assigned in editor
DialogueSystemTrigger trigger = new DialogueSystemTrigger();
trigger.selectedDatabase = database;
trigger.trigger = DialogueSystemTriggerEvent.OnUse;
trigger.conversation = "NameOfConversation";
trigger.OnUse();
Thanks for any help
-
Tony Li
- Posts: 21987
- Joined: Thu Jul 18, 2013 1:27 pm
Post
by Tony Li »
Hi,
Use
DialogueManager.StartConversation():
Code: Select all
DialogueManager.StartConversation("NameOfConversation");
You can optionally specify the actor GameObject, conversant GameObject, and starting entry ID. (See the API reference in the link.)
-
boz
- Posts: 76
- Joined: Mon Oct 19, 2020 8:59 pm
Post
by boz »
Perrrrrfect, thank you!