Page 1 of 1

Conversations that can be "heard" only at certain distance

Posted: Mon Mar 30, 2020 11:24 am
by Haytam95
Hi!

I'm working with SLATE sequencer and Dialogue System to time the conversations and animations. It works pretty well, you really did a good job with the integration.

Now I'm implementing some NPC dialogues (with other NPC), that triggers when the player enters certain range (I just play the SLATE sequence) and that sequence have all fragments from the conversation.

Now what i'd like to do is, that when the player is outside the range, the dialogue system don't show the UI. The conversation should continue as normal.

I thought about making a new action in the SLATE sequencer that evaluates the player distance and then decide to execute or not the fragment in the conversation, while the sequence keeps playing but i'd like to know if there is a better way to aproach this.

Edit: Also this could make two conversations active at the same time. This would be a trouble? (I'm trying to use SLATE sequencer every time i can, to adjust the time of each fragment of dialogue)

Re: Conversations that can be "heard" only at certain distance

Posted: Mon Mar 30, 2020 1:42 pm
by Tony Li
Hi,
Haytam95 wrote: Mon Mar 30, 2020 11:24 amNow what i'd like to do is, that when the player is outside the range, the dialogue system don't show the UI. The conversation should continue as normal.
You could add a big trigger collider to the NPC's area. Add a Trigger Event component to it. Configure the OnTriggerEnter() event to enable the dialogue UI's Canvas. Configure OnTriggerExit() to disable the Canvas.
Haytam95 wrote: Mon Mar 30, 2020 11:24 amEdit: Also this could make two conversations active at the same time. This would be a trouble? (I'm trying to use SLATE sequencer every time i can, to adjust the time of each fragment of dialogue)
That's fine. Tick the Dialogue Manager's Other Settings > Allow Simultaneous Conversations, and use separate dialogue UIs for them. Use Override Dialogue UI components to specify which NPC should use which dialogue UI.

Re: Conversations that can be "heard" only at certain distance

Posted: Mon Mar 30, 2020 8:29 pm
by Haytam95
Thanks Tony. I'll try that!