Page 1 of 1

Pause/Wait timer for animations.

Posted: Wed Apr 13, 2022 3:26 pm
by Fearinhell
I have tied a yes response in my dialogue to an animation. I was wanting to either wait til the animation is finished OR just have a timer that is the animation length before the next dialogue response occurs. Thanks in advance.

Re: Pause/Wait timer for animations.

Posted: Wed Apr 13, 2022 4:08 pm
by Tony Li
Hi,

A dialogue entry node's subtitle will stay onscreen until the node's Sequence is done. If the node's Sequence is blank, it will play the Dialogue Manager GameObject's Camera & Cutscene Settings > Default Sequence.

Say the animation is named "Nod Yes", and it's on the node's speaker. You can set the node's Sequence to:

Code: Select all

AnimatorPlayWait(Nod Yes)
The node will play this animation and advance the conversation when the animation is done.

Exception: If you've set the Dialogue Manager's Subtitle Settings > Continue Button to a mode that uses continue buttons, such as Always, the node will wait until the player clicks the continue button.

Re: Pause/Wait timer for animations.

Posted: Sat Apr 16, 2022 11:22 am
by Fearinhell
My issue is that the animation plays on the Actor and I need the pause during the conversant. Anyway for just a timer sequence?

Re: Pause/Wait timer for animations.

Posted: Sat Apr 16, 2022 11:39 am
by Fearinhell
Found the list in the sequence, so Delay(15);
look right?

Re: Pause/Wait timer for animations.

Posted: Sat Apr 16, 2022 6:58 pm
by Fearinhell
Continuing with what Im working on here, during this certain conversation I want them to not be able to hit the escape key and close it. Anyway to do that without stopping escape for the entire scene?

Re: Pause/Wait timer for animations.

Posted: Sat Apr 16, 2022 7:00 pm
by Tony Li
Hi,

Yes. If you only want the dialogue entry node to wait for 15 seconds, Delay(15) will do it.

The Escape key is probably still mapped to the Dialogue Manager's Display Settings > Input Settings > Cancel Subtitle Input and Cancel Conversation Input. These are all-or-nothing settings. I recommend setting them to None instead of Escape. This will disable them entirely.

Then you can set the Dialogue Manager's Display Settings > Subtitle Settings > Continue Button dropdown to a mode such as Always or Optional. (More info: table of Continue Button modes)

Add a UI Button Key Trigger component to your subtitle panel's continue button. Set the Key to Escape. This will map Escape as a hotkey that clicks the continue button to advance the conversation.

To disable the continue button for a specific dialogue entry node, use the SetContinueMode() sequencer command. For example, to do an unskippable delay for 5 seconds, use this sequence:

Code: Select all

SetContinueMode(false);
SetContinueMode(true)@5
Note that you don't need the Delay(5) because SetContinueMode(true)@5 will wait for 5 seconds and then re-enable the continue button.

If you also want to automatically advance the conversation after 5 seconds, use this:

Code: Select all

SetContinueMode(false);
required SetContinueMode(true)@5;
Continue()@5
The Continue() command simulates a continue button click.