Page 1 of 1
How to pause dialogue
Posted: Sun Dec 25, 2022 2:31 pm
by dryuk
Hello, it's possible to pause dialogue when they start?
For example, when I am in dialogue and want to start a mini-game, the dialogue should pause, so when the mini-game ends, the next record of dialogue should start.
Re: How to pause dialogue
Posted: Sun Dec 25, 2022 3:07 pm
by Tony Li
Hi,
Yes. One way is to use the WaitForMessage() sequencer command. For example, set a node's Sequence to:
Code: Select all
SetDialoguePanel(false); // Hide dialogue UI
SetActive(MyMinigame, true); // Set GameObject named MyMinigame active
WaitForMessage(MinigameDone) // Wait for minigame to send sequencer message "MinigameDone"
When the minigame is done, it should use the C# method Sequencer.Message("MinigameDone");
Then the next node's Sequence can be:
Code: Select all
SetDialoguePanel(true); // Show dialogue UI
{{default}} // And play Dialogue Manager's Default Sequence
Related, see:
How To: Pause Dialogue In Pause Menu for instructions on how to tell the Dialogue System to ignore input while the minigame is playing.
Re: How to pause dialogue
Posted: Mon Dec 26, 2022 8:13 am
by dryuk
Thank you! It helped me a lot
Re: How to pause dialogue
Posted: Mon Dec 26, 2022 8:25 am
by Tony Li
Glad to help!