How to wait for a few seconds

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Aldurroth
Posts: 43
Joined: Wed Jul 20, 2022 8:44 pm

How to wait for a few seconds

Post by Aldurroth »

Iv been trying to get the Delay() function to work forever but I have never goten it to work. So here is the scene. I switch to a new camera. Then I wait for 2 seconds then I turn the Auto Dolly bool on. The cam moves and then after...20 seconds the option to click next in my dialogue system comes up. That way I cant skip the camera sequence.

The main concern is the "Wait for X amount of TIME" thing. How can I get this to work?

Thank you.
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to wait for a few seconds

Post by Tony Li »

Hi,

Are you using Timeline? Cinemachine?

The Delay() sequencer command is typically used in a dialogue entry node's Sequence field, or the Dialogue Manager GameObject's Display Settings > Camera & Cutscene Settings > Default Sequence if the node's Sequence field is blank.

When the Dialogue System shows a node's subtitle, the subtitle will stay onscreen for the duration of the node's Sequence. If the Sequence is Delay(5), the subtitle will stay onscreen for 5 seconds. Then it will advance to the next step in the conversation. The exception is if you've set the Dialogue Manager's Subtitle Settings > Continue Button dropdown to a value that requires the player to click a continue button to advance. In this case, the subtitle will not disappear until the player clicks the continue button.
Aldurroth
Posts: 43
Joined: Wed Jul 20, 2022 8:44 pm

Re: How to wait for a few seconds

Post by Aldurroth »

There must be something I'm not understanding. Here is a vid going over my issue. Iv been at this for hours so I apoligize if i seem agitated or anything.

Aldurroth
Posts: 43
Joined: Wed Jul 20, 2022 8:44 pm

Re: How to wait for a few seconds

Post by Aldurroth »

Also i noticed when i start a conversation my "Continue button" in my "Dialogue Manager" switches from "Optional" to "Always". Not sure why it dose this but it dose.
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to wait for a few seconds

Post by Tony Li »

Hi,

If you always want it to wait 5 seconds, set the Sequence field, or the Dialogue Manager's Default Sequence, to:

Code: Select all

SetContinueMode(false);
SetContinueMode(true)@5
If you want to show the continue button after the typewriter is finished (which I mention because it's a common thing to do), set the Dialogue Manager's Subtitle Settings > Continue Mode to Always. Configure the subtitle panel typewriter effect's OnCharacter() event to disable the continue button and OnEnd() to enable it.
Aldurroth
Posts: 43
Joined: Wed Jul 20, 2022 8:44 pm

Re: How to wait for a few seconds

Post by Aldurroth »

This seems to have worked. Thank you.
Aldurroth
Posts: 43
Joined: Wed Jul 20, 2022 8:44 pm

Re: How to wait for a few seconds

Post by Aldurroth »

Last question for the day. Any idea how to move from animation to animation without my characters snapping from anim1 to anim2? I
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to wait for a few seconds

Post by Tony Li »

Using sequencer commands? If so, you can specify a cross-fade duration. Example:

Code: Select all

AnimatorPlay(anim1, speaker);
AnimatorPlayWait(anim2, speaker, 0.5)@2
At the 2-second mark, the speaker will cross-fade from anim1 to anim2 over 0.5 seconds.
Post Reply