Delay on dialogue node

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hrohibil
Posts: 380
Joined: Thu Nov 04, 2021 12:50 pm

Delay on dialogue node

Post by hrohibil »

Hi Tony

How can I create a delay before the dialogue UI starts?
I have a AnimatorPlay set to play a specific animation on the NPC which I want to play BEFORE the dialogue UI/TEXT starts..

Hope it makes sense
User avatar
Tony Li
Posts: 22655
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay on dialogue node

Post by Tony Li »

Link <START> to an empty dialogue entry node. Then link that empty dialogue entry node to your first text node.

In the empty dialogue entry node, use a sequence like this:

Code: Select all

SetDialoguePanel(false, immediate);
AnimatorPlayWait(Your Animation)->Message(Done);
required SetDialoguePanel(true)@Message(Done);
Continue()@Message(Done)
The first command will hide the dialogue UI.

The second command will play an animation. You will need to adjust this command for your needs. When it's done, it will send the message "Done" to the sequencer.

The third command waits for the "Done" message and then shows the dialogue UI.

The fourth command continues to the next node.
hrohibil
Posts: 380
Joined: Thu Nov 04, 2021 12:50 pm

Re: Delay on dialogue node

Post by hrohibil »

Amazing fast response. Can I still use LookAt() and SwitchCamera commands along with this?

Thank you Tony
hrohibil
Posts: 380
Joined: Thu Nov 04, 2021 12:50 pm

Re: Delay on dialogue node

Post by hrohibil »

Worked!!!
User avatar
Tony Li
Posts: 22655
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay on dialogue node

Post by Tony Li »

Great! Glad to help. And, yes, you've probably already found out, but you can use those commands, too.
Post Reply