Page 1 of 1

Issues with SetDialoguePanel

Posted: Fri Feb 24, 2023 3:14 pm
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

Re: Issues with SetDialoguePanel

Posted: Fri Feb 24, 2023 3:40 pm
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

Re: Issues with SetDialoguePanel

Posted: Fri Feb 24, 2023 3:43 pm
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?

Re: Issues with SetDialoguePanel

Posted: Fri Feb 24, 2023 4:23 pm
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

Re: Issues with SetDialoguePanel

Posted: Mon Mar 06, 2023 4:35 pm
by 7ports
This worked great, thank you so much for your help.

Re: Issues with SetDialoguePanel

Posted: Mon Mar 06, 2023 5:40 pm
by Tony Li
Glad to help!