How to add delaythat prevents continue
How to add delaythat prevents continue
In my dialogues, I set it to always have a continue button. And sometimes I want to wait 5 seconds after one line, even the player clicked continue, I want the dialogue to hide but still wait until the time is up to show the next sentence. I tried delay() but it does not work. I also tried AudioWait() but it only stops the music when I click continue. Any suggestions? thanks!
Re: How to add delaythat prevents continue
Hi,
You can use the SetContinueMode() sequencer command. For example, to prevent the continue button for the first 3 seconds:
(The third line above tells the sequence to also include the Dialogue Manager's Default Sequence.)
This conversation will show a subtitle, then hide the dialogue UI for 3 seconds, and then show another subtitle:
v
v
You can use the SetContinueMode() sequencer command. For example, to prevent the continue button for the first 3 seconds:
Code: Select all
SetContinueMode(false);
SetContinueMode(true)@3;
{{default}}
This conversation will show a subtitle, then hide the dialogue UI for 3 seconds, and then show another subtitle:
- Dialogue Text: "The dialogue UI will hide when you click continue."
- Sequence:
Code: Select all
required SetDialoguePanel(false)@Message(Continued)
v
- Dialogue Text: (blank)
- Sequence:
Code: Select all
SetContinueMode(false); Continue()@3; required SetContinueMode(true)@Message(Continued); required SetDialoguePanel(true)@Message(Continued)
v
- Dialogue Text: "The dialogue UI has reappeared."
Re: How to add delaythat prevents continue
That's very helpful! thanks a lot!
Just curious what is the required keyword is for?
Also I noticed there is a little dialogue fade in and out as if it tries to fade in the empty dialogue, but then fade out it because of the SetDialoguePanel, any suggestion about it?
Just curious what is the required keyword is for?
Also I noticed there is a little dialogue fade in and out as if it tries to fade in the empty dialogue, but then fade out it because of the SetDialoguePanel, any suggestion about it?
Re: How to add delaythat prevents continue
Hi,
The 'required' keyword guarantees that the command runs even if the @ condition isn't reached.
In this example:
Audio(beep) will normally play at the 2-second mark. However, if the player advances the conversation before the 2-second mark, the required keyword guarantees that Audio(beep) will still play.
In the case of:
The command waits for something to send the message "Continued". Nothing actually sends this message. (The continue button doesn't send any message.) When the player clicks the continue button, the required keyword guarantees that it runs anyway.
To eliminate the fade out, use:
The 'required' keyword guarantees that the command runs even if the @ condition isn't reached.
In this example:
Code: Select all
required Audio(beep)@2
In the case of:
Code: Select all
required SetDialoguePanel(false)@Message(Continued)
To eliminate the fade out, use:
Code: Select all
required SetDialoguePanel(false, immediate)@Message(Continued)
Re: How to add delaythat prevents continue
Thanks a lot! It does not flash when the previous one hide, but still faded in and out when the new panel re-appeared.
I tried to replace the set to true one with immediate too but the result is still the same.
required SetDialoguePanel(true,immediate)@Message(Continued);
I tried to replace the set to true one with immediate too but the result is still the same.
required SetDialoguePanel(true,immediate)@Message(Continued);
Re: How to add delaythat prevents continue
Hi,
You can fiddle with your dialogue UI's animator setup (it's possible you need to adjust transition conditions), or you can disable the Dialogue Manager's Canvas instead of using SetDialoguePanel(). This might be easier. To do that, give your Dialogue Manager's Canvas a unique name such as DialogueCanvas. Then, instead of this:
use this:
And instead of this:
use this:
You can fiddle with your dialogue UI's animator setup (it's possible you need to adjust transition conditions), or you can disable the Dialogue Manager's Canvas instead of using SetDialoguePanel(). This might be easier. To do that, give your Dialogue Manager's Canvas a unique name such as DialogueCanvas. Then, instead of this:
Code: Select all
required SetDialoguePanel(false)@Message(Continued)
Code: Select all
required SetEnabled(Canvas, false, DialogueCanvas)@Message(Continued)
Code: Select all
SetContinueMode(false);
Continue()@3;
required SetContinueMode(true)@Message(Continued);
required SetDialoguePanel(true)@Message(Continued)
Code: Select all
SetContinueMode(false);
Continue()@3;
required SetContinueMode(true)@Message(Continued);
required SetEnabled(Canvas, true, DialogueCanvas)@Message(Continued)