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
How To Run A New Dialogue Over a Pre-Existing One
-
- Posts: 36
- Joined: Wed May 03, 2017 4:34 pm
Re: How To Run A New Dialogue Over a Pre-Existing One
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.
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.
Configure the Dialogue System Trigger with two actions: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.
- Play Sequence: Play this sequence: SendMessage(StopConversation,,Dialogue Manager)
- Start Conversation: Start the new conversation.
Configure each Dialogue System Trigger to run one action: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)
- Play Sequence: Play this sequence: Continue()
-
- Posts: 36
- Joined: Wed May 03, 2017 4:34 pm
Re: How To Run A New Dialogue Over a Pre-Existing One
Thanks Tony, the continue helped. Still continuing to implement.