Page 1 of 1
SequencerCommand execution order?
Posted: Sat Mar 02, 2024 4:29 am
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?
Re: SequencerCommand execution order?
Posted: Sat Mar 02, 2024 9:27 am
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:
which will run 2 seconds after the sequencer starts (that is, at the 2-second mark of the sequence)
or:
which will run when something sends the sequencer message "waved".
More info:
Cutscene Sequences
Re: SequencerCommand execution order?
Posted: Sun Mar 03, 2024 9:35 am
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
Re: SequencerCommand execution order?
Posted: Sun Mar 03, 2024 10:18 am
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.
Re: SequencerCommand execution order?
Posted: Sun Mar 03, 2024 10:31 pm
by joeylu
is it possible to handle such SetContinueMode(bool) inside the sequencer command script? tks
Re: SequencerCommand execution order?
Posted: Mon Mar 04, 2024 9:26 am
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.
Re: SequencerCommand execution order?
Posted: Fri Mar 08, 2024 4:39 am
by joeylu
Fantastic, thank you Tony
Re: SequencerCommand execution order?
Posted: Fri Mar 08, 2024 8:52 am
by Tony Li
Glad to help!