Run other dialogue while current remains open but frozen

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jjpixelc
Posts: 44
Joined: Sun Mar 01, 2020 1:04 pm

Run other dialogue while current remains open but frozen

Post by jjpixelc »

Hi

I'm running a dialogue, a narrator text with player responses below and sometime during this dialogue I want another narrator voice to interrupt the first dialogue, with a different dialogue panel appearing on top of the first one.
The first dialogue is then frozen at it's current node, with text and possible responses still visible (one of the possible responses being the one that started the new dialogue), while the player finishes the new dialogue. The last option in the overlaying dialogue then restarts the first dialogue and moves it on to the next node.

Is this possible?
I've successfully got 2 dialogues in two different dialogue panels running at the same time, but my problem is that I can't freeze the first one - it still reacts to button presses ('space' for continue and numeric buttons for choosing responses).
Can I freeze and unfreeze the first dialogue somehow?
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Run other dialogue while current remains open but frozen

Post by Tony Li »

Hi,

When the second conversation starts, use a Canvas Group to make the first dialogue UI non-interactable. Here's an example scene:

DS_SecondConversationFreezeFirstExample_2022-07-17.unitypackage

The second conversation uses scene events to control the first dialogue UI's Dialogue Panel > Canvas Group > interactable.

If your first dialogue UI has any UIButtonKeyTrigger components, you'll also need to disable those manually while the second conversation is playing.
jjpixelc
Posts: 44
Joined: Sun Mar 01, 2020 1:04 pm

Re: Run other dialogue while current remains open but frozen

Post by jjpixelc »

Works perfectly now. Thanks!
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Run other dialogue while current remains open but frozen

Post by Tony Li »

Glad to help!
Post Reply