Page 1 of 1

Proceed to next node until some action finishes

Posted: Mon Jan 03, 2022 5:45 pm
by HunterTom
Hi,

I am wondering if the next dialogue node can show up only after the script or Events invoked by the previous node finishes.

Right now a work around I have is simply splitting them into two conversations, and only start the second conversation by script when the previous action finishes. I am just wondering if there is already some built in feature that does this in a more elegant way.

Also, how about the case where the next node shows up a certain seconds after the previous action is invoked/finished?

Thank you very much!

Re: Proceed to next node until some action finishes

Posted: Mon Jan 03, 2022 6:11 pm
by Tony Li
Hi,

Each dialogue node lasts until its Sequence is done. (If you're using a continue button mode, the dialogue node always waits until you click the continue button.)

You could set the dialogue node's Sequence to something like:

Code: Select all

{{default}};
Continue()@Message(Finished)
Then in your C# script or event, call the C# method PixelCrushers.DialogueSystem.Sequencer.Message("Finished");

The first line of the Sequence above plays whatever the Dialogue Manager's Camera & Cutscene Settings > Default Sequence is set to.

The second line continues to the next node when it receives the sequencer message "Finished". (Sequencer messages are arbitrary strings of your choosing.)