How to trigger different dialogue in different game stage

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
vgggg
Posts: 2
Joined: Thu Apr 27, 2017 6:56 pm

How to trigger different dialogue in different game stage

Post by vgggg »

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

Re: How to trigger different dialogue in different game stage

Post by Tony Li »

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.
Post Reply