Hello,
Is there any way to disable being able to hit Continue before a certain event is received by Dialogue System?
I created my own custom sequence command that I use with my dialogues. This custom command is run at every dialogue entry. This command is in fact a IEnumator function that does different stuff based on the dialogue entry (add an item to the inventory, enable hud element, play sound, fade in/out screen...). However, there is nothing in place right now that control the fact that a player can mash all he wants on the controller to use the continue button while the IEnumator state is not completed. What I thought of is to be able, at the end of the IEnumerator coroutine, tell Dialogue System that yes, all elements in the state is run and continue is "reenabled" so the player can move to the next dialogue entry.
Any idea on how I could do that? Thanks!
Control Continue button
-
- Posts: 106
- Joined: Wed Aug 23, 2017 4:10 pm
- Location: Canada
Control Continue button
Unity 2022.3.17f1
Dialogue System 2.2.44.1
OpenAI Addon 1.0.12
Dialogue System 2.2.44.1
OpenAI Addon 1.0.12
Re: Control Continue button
Hello Maxime,
You can use the SetContinueMode() sequencer command. For example:
The sequence above:
You can use the SetContinueMode() sequencer command. For example:
Code: Select all
SetContinueMode(false);
YourCustomCommand()->Message(Done);
required SetContinueMode(original)@Message(Done)
- Disables the continue button at 0:00.
- Starts YourCustomCommand() at 0:00.
- When YourCustomCommand() finishes, sends the sequencer message "Done". (This is an arbitrary string. It can be anything.)
- When the sequencer message "Done" is sent, resets the continue button back to its original state. The "required" keyword ensures that it resets the continue button no matter what.
Code: Select all
// Hide continue button:
DialogueManager.DisplaySettings.subtitleSettings.continueButton = DisplaySettings.SubtitleSettings.ContinueButtonMode.Never;
DialogueManager.ConversationView.SetupContinueButton();
...
// Show continue button:
DialogueManager.DisplaySettings.subtitleSettings.continueButton = DisplaySettings.SubtitleSettings.ContinueButtonMode.Always;
DialogueManager.ConversationView.SetupContinueButton();
-
- Posts: 106
- Joined: Wed Aug 23, 2017 4:10 pm
- Location: Canada
Re: Control Continue button
Yet again, thanks a lot for the help! This is working great.
Unity 2022.3.17f1
Dialogue System 2.2.44.1
OpenAI Addon 1.0.12
Dialogue System 2.2.44.1
OpenAI Addon 1.0.12