Page 1 of 1
I want to run a specific Dialogue Entry ID.
Posted: Thu Jul 20, 2023 3:14 am
by swang
![image](
https://github.com/kaYeonTan/OhMyHonor_ ... a56753d169)
I want to start the conversation from the designated node instead of the first node in the script.
Please let me know if there is a way. Thank you.
Re: I want to run a specific Dialogue Entry ID.
Posted: Thu Jul 20, 2023 8:32 am
by Tony Li
Hi,
Use
DialogueManager.StartConversation("title", actorTransform, conversantTransform, entryID).
For example, to start a conversation named "New Conversation 1" at entry ID 42:
Code: Select all
DialogueManager.StartConversation("New Conversation 1", actor.transform, conversant.transform, 42);
To start a conversation at the dialogue entry whose title is "Alternate Entry":
Code: Select all
Conversation conversation = DialogueManager.masterDatabase.GetConversation("New Conversation 1");
DialogueEntry entry = conversation.GetDialogueEntry(42);
DialogueManager.StartConversation("New Conversation 1", actor.transform, conversant.transform, entry.id);
Re: I want to run a specific Dialogue Entry ID.
Posted: Mon Apr 22, 2024 10:55 pm
by AoAb
we are obliged to inform the actor and the speaker transform ?
This doesn't seem to work without (null).
Re: I want to run a specific Dialogue Entry ID.
Posted: Tue Apr 23, 2024 8:11 am
by Tony Li
You can pass null as the actor and/or conversant. If they are null, the Dialogue System follows these rules:
Character GameObject Assignments
Re: I want to run a specific Dialogue Entry ID.
Posted: Tue Apr 23, 2024 2:26 pm
by AoAb
Ok thanks ! The other problem was that we need to stop conversation before be able to use DialogueManager.StartConversation().
Re: I want to run a specific Dialogue Entry ID.
Posted: Tue Apr 23, 2024 2:58 pm
by Tony Li
You may have already found this, but you can use DialogueManager.StopConversation() to stop the active conversation, or DialogueManager.StopAllConversations() if you've configured the Dialogue Manager's Other Settings to allow multiple simultaneous conversations.
Re: I want to run a specific Dialogue Entry ID.
Posted: Tue Apr 23, 2024 3:39 pm
by AoAb
Yeah thanks i found this in an other post.
And precisely I had to activate the option to allow multiple simultaneous conversations + not stop the conversation to keep the previous subtitles of the dialogues.