Conversation delay

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
SealDev
Posts: 85
Joined: Thu Jun 24, 2021 5:45 am

Conversation delay

Post by SealDev »

Any way to trigger conversation of a DialogueTrigger with a delay? I've tried using OnUse in the sequencer with @ delay but it sometimes won't trigger.
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation delay

Post by Tony Li »

Hi,

At what point do you want it to delay? Between the time that the player triggers the Dialogue System Trigger and the time that the conversation appears onscreen? If so, then one way to do that is to tick the dialogue UI's Wait For Open checkbox and set up an opening animation that delays for a duration. Another way is to add an empty node at the beginning of the conversation with a Delay(#) sequencer command. This will open the dialiogue UI and delay before showing any text.
SealDev
Posts: 85
Joined: Thu Jun 24, 2021 5:45 am

Re: Conversation delay

Post by SealDev »

I'm triggering a usable component that does a fade in / fade out that takes about 2 seconds.

I want to delay the start of the conversation by a few seconds. Only for this 1 conversation, not all of them. Basically waiting for that fade to complete.
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation delay

Post by Tony Li »

Hi,

The easiest way is to add an empty node at the beginning of the conversation. Use the SetDialoguePanel() sequencer command to temporarily hide the dialogue UI, or give the dialogue UI's canvas a unique name such as "DialogueCanvas" and use the SetEnabled() command to hide and show it. You can also set it up to do the fade in/out if you want. Example sequence:

Code: Select all

SetEnabled(Canvas, false, DialogueCanvas);
Fade(stay, 1);
fade(in, 1)@1;
SetEnabled(Canvas, true, DialogueCanvas)@2
SealDev
Posts: 85
Joined: Thu Jun 24, 2021 5:45 am

Re: Conversation delay

Post by SealDev »

Any way to prevent "Continue" button from working while the dialogue panel is hidden?
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation delay

Post by Tony Li »

Use the SetContinueMode() sequencer command. Example:

Code: Select all

SetEnabled(Canvas, false, DialogueCanvas);
SetContinueMode(false);
Fade(stay, 1);
fade(in, 1)@1;
SetEnabled(Canvas, true, DialogueCanvas)@2;
SetContinueMode(original)@2
For the last line above, I used the special keyword 'original', which restores the original continue mode. If you could use 'true' or 'always' to set it to Always instead if you prefer.
Post Reply