SequencerCommand execution order?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
joeylu
Posts: 110
Joined: Sun May 17, 2020 1:07 pm

SequencerCommand execution order?

Post by joeylu »

Hi Tony, a quick question, Does sequences has execution order? When I write custom sequence first(), custom sequence second(), and put it into the sequence field like first();second()
will the second sequence be called after first sequence calls its Stop()?
I thought it should but in my test, seems both sequence are executed at same time regardless the Stop() called or not
Or am I missed something important? :)
User avatar
Tony Li
Posts: 21021
Joined: Thu Jul 18, 2013 1:27 pm

Re: SequencerCommand execution order?

Post by Tony Li »

Hi,

All sequencer commands run in parallel as soon as the sequence starts, except for commands that have "@" timing such as for example:

Code: Select all

Audio(hello)@2
which will run 2 seconds after the sequencer starts (that is, at the 2-second mark of the sequence)

or:

Code: Select all

Audio(hello)@Message(waved)
which will run when something sends the sequencer message "waved".

More info: Cutscene Sequences
joeylu
Posts: 110
Joined: Sun May 17, 2020 1:07 pm

Re: SequencerCommand execution order?

Post by joeylu »

Good to know, tks
A follow up question, in conversation, I assume the following sequence means
SetContinueMode(false); === no continue button
SetContinueMode(true)@2; === show continue button after 2 seconds

Say if I write a custom sequencerCommand
is it possible to disable the continue button for few seconds in the sequence command script? tks
User avatar
Tony Li
Posts: 21021
Joined: Thu Jul 18, 2013 1:27 pm

Re: SequencerCommand execution order?

Post by Tony Li »

Hi,
joeylu wrote: Sun Mar 03, 2024 9:35 amSetContinueMode(false); === no continue button
SetContinueMode(true)@2; === show continue button after 2 seconds
Yes, that's correct.
joeylu wrote: Sun Mar 03, 2024 9:35 amSay if I write a custom sequencerCommand
is it possible to disable the continue button for few seconds in the sequence command script?
Yes. In your custom sequencer command, call Stop() when the command should finish. For example, let's say your command is named DoSomething(), so your sequencer command script is SequencerCommandDoSomething(). Then your sequence could look like:

Code: Select all

SetContinueMode(false);
DoSomething()->Message(Done);
required SetContinueMode(true)@Message(Done)
The first line will hide the continue button.

The second line will run your command. When the command is done, it will send the sequencer message "Done".

The third line will wait until it receives the sequencer message "Done". Then it will show the continue button. The "required" keyword guarantees that the command will run even if the conversation skips ahead before DoSomething() has finished somehow.
joeylu
Posts: 110
Joined: Sun May 17, 2020 1:07 pm

Re: SequencerCommand execution order?

Post by joeylu »

is it possible to handle such SetContinueMode(bool) inside the sequencer command script? tks
User avatar
Tony Li
Posts: 21021
Joined: Thu Jul 18, 2013 1:27 pm

Re: SequencerCommand execution order?

Post by Tony Li »

Not easily at the moment, but a C# method DialogueManager.SetContinueMode(bool) should be in version 2.2.44, scheduled for release next Monday. You'll be able to use that method in your custom sequencer command.
joeylu
Posts: 110
Joined: Sun May 17, 2020 1:07 pm

Re: SequencerCommand execution order?

Post by joeylu »

Fantastic, thank you Tony
User avatar
Tony Li
Posts: 21021
Joined: Thu Jul 18, 2013 1:27 pm

Re: SequencerCommand execution order?

Post by Tony Li »

Glad to help!
Post Reply