How To Run A New Dialogue Over a Pre-Existing One

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
n_hagialas
Posts: 36
Joined: Wed May 03, 2017 4:34 pm

How To Run A New Dialogue Over a Pre-Existing One

Post by n_hagialas »

Hi Tony,

We are using an OnTriggerEnter dialogue component to run a conversation in two separate cases and are having some trouble:

1 - We want to be able to run to OnTriggerEnter a conversation, and step on a new OnTriggerEnter and start a new conversation. The current running dialogue should end in this case. Currently the dialogue system is waiting for the current conversation to finish, instead of cancelling and running the new one.

2 - We want to be able to run to OnTriggerEnter a conversation. Each new trigger we step on advances a node in that conversation (already set up). We just want to be able to cancel the current conversation node and run the next conversation node if stepped on before the current one finishes. (we increment a number variable on each node to progress it)

Is there a simple way to make this work?

Thanks!
-Nik
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: How To Run A New Dialogue Over a Pre-Existing One

Post by Tony Li »

Hi Nik,

In both cases, it sounds like the player needs to be able to move around during the conversation. To do this, don't disable the player's movement components. It's common to add a Dialogue System Events component (or something similar) that uses the OnConversationStart() and OnConversationEnd() events to disable and re-enable the player components.

However, if you only want to disable the components for certain conversations, you can point OnConversationStart() and OnConversationEnd() to specially-configured Dialogue System Trigger components that disable/enable the player components only under specific conditions. If you need to be able to do this and have questions, let me know so I can describe the steps.

I'm also making the assumption that you're using version 2.x, which introduced the Dialogue System Trigger component. This component replaces Conversation Trigger, Sequence Trigger, Lua Trigger, etc. into a single component. The older trigger components are still supported, though.
n_hagialas wrote: Sat Mar 09, 2019 5:24 pm1 - We want to be able to run to OnTriggerEnter a conversation, and step on a new OnTriggerEnter and start a new conversation. The current running dialogue should end in this case. Currently the dialogue system is waiting for the current conversation to finish, instead of cancelling and running the new one.
Configure the Dialogue System Trigger with two actions:
  • Play Sequence: Play this sequence: SendMessage(StopConversation,,Dialogue Manager)
  • Start Conversation: Start the new conversation.
You may also want to set the Dialogue System Trigger's Condition section to only do this if the first conversation is running. (You can set a Dialogue System variable in the first conversation to mark that it's running.)
n_hagialas wrote: Sat Mar 09, 2019 5:24 pm2 - We want to be able to run to OnTriggerEnter a conversation. Each new trigger we step on advances a node in that conversation (already set up). We just want to be able to cancel the current conversation node and run the next conversation node if stepped on before the current one finishes. (we increment a number variable on each node to progress it)
Configure each Dialogue System Trigger to run one action:
  • Play Sequence: Play this sequence: Continue()
n_hagialas
Posts: 36
Joined: Wed May 03, 2017 4:34 pm

Re: How To Run A New Dialogue Over a Pre-Existing One

Post by n_hagialas »

Thanks Tony, the continue helped. Still continuing to implement.
Post Reply