Page 1 of 1

Any way to temporarily pause dialogue?

Posted: Tue Jun 30, 2015 9:29 pm
by BaddyDan
Hi,

I'm wondering if there's any way I can pause dialogue for a given period of time. For example, in the middle of a conversation, I have a sequence of animations happen and I only want the text to continue only after the animation has been completed.

It would be great if anyone can help me with this. Many thanks in advance!

Re: Any way to temporarily pause dialogue?

Posted: Tue Jun 30, 2015 10:26 pm
by Tony Li
Hi,

Use the sequencer's "@Message" syntax. See this manual page. Scroll down to Example 2: Waiting for Messages for an example.

Here's a simple example:

Code: Select all

AnimatorPlayWait(Dance)->Message(DoneDancing);
AnimatorPlay(Idle)@Message(DoneDancing) 
This sequence plays the animator state "Dance" and waits until it's done. When it's done, it sends the message "DoneDancing" to the sequencer. The second command, AnimatorPlay(Idle), doesn't start until it receives the message "DoneDancing". The conversation won't continue until all of the sequencer commands have run.

The Dialogue System's Tutorial Example scene uses this syntax, but it waits for a message that's generated by player actions. The dialogue text is something like "Pick up a blue cube." The sequence waits until it receives a message. This message is sent by a gameplay script that calls the static method Sequencer.Message().