Proceed to next node until some action finishes

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
HunterTom
Posts: 18
Joined: Fri Dec 24, 2021 4:58 pm

Proceed to next node until some action finishes

Post 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!
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Proceed to next node until some action finishes

Post 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.)
Post Reply