Starting conversation/cutscene from script

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting conversation/cutscene from script

Post by Tony Li »

Hi,

> 1. If I set "continue button" to "never", then the conversation never ends.

When Continue Button is set to Never, the conversation will advance when the current dialogue entry node's Sequence ends. If the Sequence is set to something like:

Code: Select all

WaitForMessage(Foo)
and nothing sends the message "Foo", then the node will wait forever.


> 2. The dialogue window quickly appears and disappears right before the conversation starts.

This might have something to do with the dialogue panel's Animator. Keep an eye on the Animator view of the dialogue panel at runtime.


> 3. After the first line of dialogue finished typing, it immediately skips to the next with no pause. Previously, I could control this pause using "min subtitle seconds", but this doesn't seem to affect the pause duration after changing "default sequence". Ideally I'd like to have a default pause duration between when a line finishes and when it advances to the next line.

To delay 2 more seconds after the typewriter finishes, try setting the Default Sequence to:

Code: Select all

Delay(2)@Message(Typed)
> I think some or all of these may be related to the fact that I have nodes in the dialogue tree before and after the nodes that contain dialogue text.

If a node doesn't have Dialogue Text or Menu Text, it won't show a subtitle panel. However, if your main dialogue panel has visible elements, you might want to use the SetDialoguePanel(false) sequencer command:

Code: Select all

SetDialoguePanel(false, immediate);
MoveTo(Node1,Npc1,1.5)
robloxillian
Posts: 27
Joined: Mon Sep 13, 2021 6:55 pm

Re: Starting conversation/cutscene from script

Post by robloxillian »

Thank you-- changing the default sequence fixed the delay between slides. Everything seems to be working except for the window appearing and disappearing. I looked at the animator window and conversation in the dialogue editor while playing the cutscene and noticed the following:

- When the node containing the moveTo sequence starts, the animator enters the "start" state very briefly before changing to the "show" state. It remains there for the duration of the cutscene sequence as the NPC moves, and does not change at all when the dialogue window flickers.
- When the dialogue window flickers, it displays the first letter or two of the dialogue text in the node immediately following the moveTo node. However, looking at the dialogue editor, the conversation remains on the moveTo node during the couple of frames the dialogue window appears, and only advances to the actual conversation node once it reappears and starts scrolling through text normally.

I tried using SetDialougePanel(false) in the sequence node as you suggested, but if I do this, the cutscene never advances past the NPC moving to the target node, and the dialogue window never appears. I am a bit confused about the animator entering the "show" state when there is no window-- maybe that is related?

Thanks again for all of your help-- everything is working very smoothly except for this last issue.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting conversation/cutscene from script

Post by Tony Li »

To avoid that flicker, rename the Dialogue Manager's Canvas to "DialogueCanvas" and use this sequencer command instead of SetDiaoguePanel:

Code: Select all

SetEnabled(Canvas, false, DialogueCanvas)
To show it again:

Code: Select all

SetEnabled(Canvas, true, DialogueCanvas)
robloxillian
Posts: 27
Joined: Mon Sep 13, 2021 6:55 pm

Re: Starting conversation/cutscene from script

Post by robloxillian »

Thank you so much! That did it-- if I re-enable at 0.1 seconds into the node, the dialogue window fades in correctly without the flicker.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting conversation/cutscene from script

Post by Tony Li »

Glad to help!
Post Reply