Hello,
I'm hoping I can get some ideas on how to solve this, I've kinda hit a wall here. For reference, I'm using Ink to handle the text.
So my old dialogue system handled in-line commands (I've already recreated this in DS). One of these commands is what I called the async command. Basically, once the typewriter function reaches that index, it immediately plays the next line while continuing to type out the current one.
This was decently simple to implement with my old system, but I'm having trouble doing this "properly" in DS. Any ideas/suggestions would be much appreciated.
Play multiple text lines in parallel?
Re: Play multiple text lines in parallel?
Hi,
One option is to write your own implementation of the IDialogueUI C# interface. Add it to a GameObject or prefab, and assign that to the Dialogue Manager's Dialogue UI field. The Dialogue System will work happily with anything that implements IDialogueUI. I mention this because you might prefer to write a simple, bespoke implementation that does exactly what you want and nothing more.
Alternatively, to use the built-in Standard Dialogue UI implementation of IDialogueUI, I could use some details on your UI. Do you want all of the text to accumulate in a single text box (i.e., same subtitle panel)? Or are different lines in different subtitle panels, such as if they're spoken by different characters?
If they're in different subtitle panels, it's easier. Make a subclass of StandardUISubtitlePanel. Override FinishSubtitle() to not stop the typewriter:
Then assign the subclass to your subtitle panels in place of StandardUISubtitlePanel.
If it's all in one subtitle panel, how do you want it to work? Two typewriters happening at once in the same box?
One option is to write your own implementation of the IDialogueUI C# interface. Add it to a GameObject or prefab, and assign that to the Dialogue Manager's Dialogue UI field. The Dialogue System will work happily with anything that implements IDialogueUI. I mention this because you might prefer to write a simple, bespoke implementation that does exactly what you want and nothing more.
Alternatively, to use the built-in Standard Dialogue UI implementation of IDialogueUI, I could use some details on your UI. Do you want all of the text to accumulate in a single text box (i.e., same subtitle panel)? Or are different lines in different subtitle panels, such as if they're spoken by different characters?
If they're in different subtitle panels, it's easier. Make a subclass of StandardUISubtitlePanel. Override FinishSubtitle() to not stop the typewriter:
Code: Select all
public override void FinishSubtitle()
{
HideContinueButton();
//--- Don't stop typing:
//var typewriter = GetTypewriter();
//if (typewriter != null && typewriter.isPlaying) typewriter.Stop();
}
If it's all in one subtitle panel, how do you want it to work? Two typewriters happening at once in the same box?
Re: Play multiple text lines in parallel?
Definitely the latter.Do you want all of the text to accumulate in a single text box (i.e., same subtitle panel)? Or are different lines in different subtitle panels, such as if they're spoken by different characters?
The Standard implementation has lots of bells and whistles that I'd like to use, haha.One option is to write your own implementation of the IDialogueUI C# interface.
Pretty sure this'll work for me. Thank you very much for your helpIf they're in different subtitle panels, it's easier. Make a subclass of StandardUISubtitlePanel. Override FinishSubtitle() to not stop the typewriter:
Re: Play multiple text lines in parallel?
Glad to help! If you have questions about setting up that subclass, just let me know.