Hi Tony,
I'm new to the Dialogue System and Unity in general, so I do apologize if this is a simple question.
So I am using the Textline addon and would like to customize the delay times before a dialogue appears.
Ultimately I want the response panel to appear instantly but have a constant delay for the NPC and Player dialogues. At the moment I can adjust the Default Player Sequence and Default Response Menu Sequence under Camera settings to set a delay for after the Player and Response dialogue, but not before.
I've started a custom script for Default Sequence with None(); MyScriptProcess() but I'm not sure how to achieve this effect, so was hoping you could help me.
Thanks for reading this!
Cheers,
Amy
Customizing Delay Times
Re: Customizing Delay Times
Hi Amy,
That's a good idea. I hope you don't mind that I stole it and just put it in an updated version of the Textline package. You can download the updated version from the Dialogue System Extras page or here: direct download.
If you import it, do not overwrite your dialogue database! The only files you need to import are:
The instructions are in the documentation, but I'll also paste them here:
Pre-Delay Settings
By default, the Dialogue Manager’s Default Sequence and Default Player Sequence play a “message received” audio tone and delay for a number of seconds after showing the subtitle.
If you instead want to delay before showing the subtitle:
1. Inspect the dialogue UI’s NPC Pre Delay Settings and/or PC Pre Delay Settings. Tick Based On Text Length to pre-delay based on the Dialogue Text length and the Dialogue Manager’s Subtitle Settings > Subtitle Chars Per Second. Set Additional Seconds to delay a set duration, which may be on top of the text length delay.[/list]
2. If you left Based On Text Length unticked and set Additional Seconds to a non-zero value, set
the Default Sequence (or Default Player Sequence) to:
where 2 is the value of Additional Seconds.
3. If you ticked Based On Text Length and left Additional Seconds at zero, set the Default Sequence (or Default Player Sequence) to:
(The keyword {{end}} represents a value based on the text length.)
4. If you ticked Based On Text Length and set Additional Seconds, set the Default Sequence (or
Default Player Sequence) to:
where 2 is the value of Additional Seconds. The first line waits for a duration based on the text length, then delays 2 seconds more, then sends the sequencer a message "PlayNow". The second line waits until it receives the sequencer message "PlayNow" and then plays the audio clip.
That's a good idea. I hope you don't mind that I stole it and just put it in an updated version of the Textline package. You can download the updated version from the Dialogue System Extras page or here: direct download.
If you import it, do not overwrite your dialogue database! The only files you need to import are:
Code: Select all
Assets/Dialogue System Extras/Textline/Textline_Documentation.pdf
Assets/Dialogue System Extras/Textline/Scripts/TextlineDialogueUI.cs
Pre-Delay Settings
By default, the Dialogue Manager’s Default Sequence and Default Player Sequence play a “message received” audio tone and delay for a number of seconds after showing the subtitle.
If you instead want to delay before showing the subtitle:
1. Inspect the dialogue UI’s NPC Pre Delay Settings and/or PC Pre Delay Settings. Tick Based On Text Length to pre-delay based on the Dialogue Text length and the Dialogue Manager’s Subtitle Settings > Subtitle Chars Per Second. Set Additional Seconds to delay a set duration, which may be on top of the text length delay.[/list]
2. If you left Based On Text Length unticked and set Additional Seconds to a non-zero value, set
the Default Sequence (or Default Player Sequence) to:
Code: Select all
Audio(ReceiveText)@2
3. If you ticked Based On Text Length and left Additional Seconds at zero, set the Default Sequence (or Default Player Sequence) to:
Code: Select all
Audio(ReceiveText)@{{end}}
4. If you ticked Based On Text Length and set Additional Seconds, set the Default Sequence (or
Default Player Sequence) to:
Code: Select all
Delay(2)@{{end}}->Message(PlayNow);
Audio(ReceiveText)@Message(PlayNow)
Re: Customizing Delay Times
Hi Tony,
Wow this is the exact effect I was looking for, works like a charm!
Thanks so much for your help
Wow this is the exact effect I was looking for, works like a charm!
Thanks so much for your help
Re: Customizing Delay Times
Happy to help!