How to trigger different dialogue in different game stage
How to trigger different dialogue in different game stage
Hi. We're making a game with several game stages. We need to trigger different dialogue in different stage. How could we make it? Thanks.
Re: How to trigger different dialogue in different game stage
Hi!
It depends on how you're triggering conversations. Here are some ideas:
- Keep track of the stage in a Dialogue System variable. In the Dialogue Editor, branch your conversation based on the value of this variable. To set a Dialogue System variable, use DialogueLua.SetVariable() in a script or an equivalent visual scripting action (e.g., PlayMaker). Then check this variable in your dialogue entry nodes' Conditions fields. You can use the Lua wizard to set Conditions fields.
- Add different Conversation Triggers on different GameObjects, one GameObject for each stage. Activate the corresponding GameObject for each stage.
- Add all of the Conversation Triggers to a single GameObject, and use the Condition section of each one to specify which conversation to start.
- Or manually call DialogueManager.StartConversation() in a script (or equivalent visual scripting action), specifying the conversation you want to start.
For simplicity, I recommend keeping all of your conversations in a single dialogue database. You can use forward slash characters ( "/" ) in your conversation titles to group them into submenus in the Dialogue Editor.
It's possible, though, to use multiple dialogue databases.
It depends on how you're triggering conversations. Here are some ideas:
- Keep track of the stage in a Dialogue System variable. In the Dialogue Editor, branch your conversation based on the value of this variable. To set a Dialogue System variable, use DialogueLua.SetVariable() in a script or an equivalent visual scripting action (e.g., PlayMaker). Then check this variable in your dialogue entry nodes' Conditions fields. You can use the Lua wizard to set Conditions fields.
- Add different Conversation Triggers on different GameObjects, one GameObject for each stage. Activate the corresponding GameObject for each stage.
- Add all of the Conversation Triggers to a single GameObject, and use the Condition section of each one to specify which conversation to start.
- Or manually call DialogueManager.StartConversation() in a script (or equivalent visual scripting action), specifying the conversation you want to start.
For simplicity, I recommend keeping all of your conversations in a single dialogue database. You can use forward slash characters ( "/" ) in your conversation titles to group them into submenus in the Dialogue Editor.
It's possible, though, to use multiple dialogue databases.