Questions about auto-continue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
urrmurrmur
Posts: 47
Joined: Wed May 05, 2021 1:57 pm

Questions about auto-continue

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

Re: Questions about auto-continue

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