Issues with SetDialoguePanel

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
7ports
Posts: 16
Joined: Mon Jun 20, 2022 4:08 pm

Issues with SetDialoguePanel

Post by 7ports »

Hey Forum,

I'm trying to use the sequencer command SetDialoguePanel(false, immediate); to hide the dialogue UI for a couple seconds before a conversation starts. I'm setting the panel to active again in the same node just after a short delay. It seems to be working fine at first but after the convo starts subtitle panels don't get erased between messages so the two texts are printing on top of each other (this doesn't break if I don't set the dialogue panel to false first). I have 2 separate subtitle panels for this particular UI, each with their own text box placed in the same location as both their portraits are to be visible simultaneously.


Please let me know if you might know why the behaviour is suddenly changing after setting to false then true again.

Cheers,
Raj
User avatar
Tony Li
Posts: 21680
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues with SetDialoguePanel

Post by Tony Li »

Hi,

When the node runs, or when you switch to another node, it should replace the text. However, you can try using the ClearSubtitleText() sequencer command. For example:

Code: Select all

SetDialoguePanel(false, immediate);
ClearSubtitleText(alll);
SetDialoguePanel(true)@2
7ports
Posts: 16
Joined: Mon Jun 20, 2022 4:08 pm

Re: Issues with SetDialoguePanel

Post by 7ports »

In this case no text gets printed to the UI until after its reactivated, so this unfortunately isn't doing the trick. is there maybe some event that isn't getting subscribed to successfully if the panel gets deactivated immediately?
User avatar
Tony Li
Posts: 21680
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues with SetDialoguePanel

Post by Tony Li »

Hi,

Got it. Yes, you're correct, since the subtitle panel is inactive, certain things such as the typewriter effect can't run, so it won't set the text. Since you want to show and hide within the same node, use the alternate way to hide the UI: disable the dialogue UI's canvas.

1. Give the dialogue UI's canvas a unique name such as "DialogueCanvas".

2. Use the SetEnabled() sequencer command. For example:

Code: Select all

SetEnabled(Canvas, false, DialogueCanvas);
SetEnabled(Canvas, true, DialogueCanvas)@2
7ports
Posts: 16
Joined: Mon Jun 20, 2022 4:08 pm

Re: Issues with SetDialoguePanel

Post by 7ports »

This worked great, thank you so much for your help.
User avatar
Tony Li
Posts: 21680
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issues with SetDialoguePanel

Post by Tony Li »

Glad to help!
Post Reply