Page 1 of 1

Questions about auto-continue

Posted: Sat Aug 14, 2021 12:35 pm
by urrmurrmur
Hi,

I have a question about auto-continuing to the next dialogue entry. Is it possible to let the conversation hold or continue to the next state based on the presence of an audio file?

I have some states that have a corresponding audio file, and others that don't. If I set the Continue Button to "Always", it always needs to be pressed to continue (makes sense). If I set it to optional, the conversation automatically continues but the button can be used to skip ahead (also makes sense). However, what I would like is for the conversation to auto-continue (the "optional" behavior) if there is an audio file for the current entry, but hold until the player has pressed continue (the "always" behavior) if there isn't. I know I can use sequencer commands (specifically Continue() in combination with Delay({{end}}) ) on an entry-by-entry basis, but ideally I'd have some default sequence command or setting that produces this behavior.

Re: Questions about auto-continue

Posted: Sat Aug 14, 2021 2:15 pm
by Tony Li
Hi,

You could write a custom sequencer command -- maybe called ContinueIfPresent(audioclip). If audioclip exists, it could automatically continue the conversation after the length of the audioclip. Continue the conversation by calling the dialogue UI's OnContinueConversation() method.

Then your Default Sequence could look something like:

Code: Select all

AudioWait(entrytag);
ContinueIfPresent(entrytag)
A quick way to write the ContinueIfPresent sequencer command is to duplicate SequencerCommandAudioWait.cs. Name it SequencerCommandContinueIfPresent.cs, and comment out the code that actually plays audio. When it's done (i.e., where is calls Stop()), call DialogueManager.standardDialogueUI.OnContinueConversation().