Page 1 of 1

Possible to have conversation advance only on condition/variable?

Posted: Sat Apr 04, 2020 4:27 pm
by Internet Person
I'm using the Dialogue System (fantastic tool so far, extremely well documented!) to create a tutorial system and am running into difficulties. I'd like each piece of dialogue to stay on the screen and wait until a certain condition is met or variable is set before advancing to the next. Kind of like having the continue button set to Always, except a condition is used instead of clicking the button.

The condition checks in a Dialogue Entry don't seem to be suitable for this, because as soon as the system encounters a false condition it just ends the entire conversation. There doesn't seem to be a way to keep the conversation open and wait for a condition. Anyone have any ideas?

Re: Possible to have conversation advance only on condition/variable?

Posted: Sat Apr 04, 2020 6:30 pm
by Tony Li
Hi,

Consider using the WaitForMessage() sequencer command.

Example:
  • Dialogue Text: "Build a supply depot."
  • Sequence: WaitForMessage(Built_Supply_Depot)
When the player builds a supply depot, use this line of C# code:

Code: Select all

PixelCrushers.DialogueSystem.Sequencer.Message("Built_Supply_Depot")

Re: Possible to have conversation advance only on condition/variable?

Posted: Sat Apr 04, 2020 8:15 pm
by Internet Person
Tony Li wrote: Sat Apr 04, 2020 6:30 pm Consider using the WaitForMessage() sequencer command.
Thanks, this seems to be perfect for my purposes!
The sequence field seems to be extremely useful, I had never used it before.

Re: Possible to have conversation advance only on condition/variable?

Posted: Sat Apr 04, 2020 8:30 pm
by Tony Li
Glad to help!

The manual has a section on Cutscene Sequences, as well as a Cutscene Sequences Tutorials series if you prefer video.