Possible to have conversation advance only on condition/variable?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Internet Person
Posts: 3
Joined: Sat Apr 04, 2020 4:16 pm

Possible to have conversation advance only on condition/variable?

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

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

Post 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")
Internet Person
Posts: 3
Joined: Sat Apr 04, 2020 4:16 pm

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

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

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

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