Modifying "Dialogue Manager" and "ConversationTriggerObject" in script
Modifying "Dialogue Manager" and "ConversationTriggerObject" in script
Greetings. I would like to have hundreds of conversations that use Dialogue System conversation in my game. My plan is to have one scene with a control script that helps pick conversations. By doing this, I won't need to create a scene for each and every conversation. So now I am trying to write some code that feeds conversations to "Dialogue Manager" and "ConversationTriggerObject". Is this a good approach? If so, how do I modify "Initial Database" in "Dialogue manager", "Reference Database" and "conversation" in "ConversationTriggerObject" using a script? Thank you!
Re: Modifying "Dialogue Manager" and "ConversationTriggerObject" in script
Hi,
The Dialogue System Trigger's Reference Database is only used in the inspector to specify which database's conversations to show in the dropdown menus. It's not used at runtime. So we can ignore that.
Don't modify Initial Database. If you need more than one database, assign one to the Initial Database field, and load the others using an Extra Databases components. (See: Working With Multiple Databases)
You normally don't need to create a scene for every conversation. See for example the Dialogue System's DemoScene1. It has two Dialogue System Triggers that start different conversations, one on the soldier NPC and one on the computer terminal. Some games have scenes that have dozens of Dialogue System Triggers in the same scene, each starting their own conversation.
What is ConversationTriggerObject? If it's a custom script, you can start a conversation using the C# DialogueManager.StartConversation() method.
The Dialogue System Trigger's Reference Database is only used in the inspector to specify which database's conversations to show in the dropdown menus. It's not used at runtime. So we can ignore that.
Don't modify Initial Database. If you need more than one database, assign one to the Initial Database field, and load the others using an Extra Databases components. (See: Working With Multiple Databases)
You normally don't need to create a scene for every conversation. See for example the Dialogue System's DemoScene1. It has two Dialogue System Triggers that start different conversations, one on the soldier NPC and one on the computer terminal. Some games have scenes that have dozens of Dialogue System Triggers in the same scene, each starting their own conversation.
What is ConversationTriggerObject? If it's a custom script, you can start a conversation using the C# DialogueManager.StartConversation() method.