Custom Delay Time before Continue?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
gamefang
Posts: 4
Joined: Thu Sep 07, 2023 4:07 pm

Custom Delay Time before Continue?

Post by gamefang »

Hello,

I want to make a delay time, after the REAL dialogue text is done. It's working when add some rich texts like so:
1.png
1.png (9.32 KiB) Viewed 494 times
however I guess it shall be easier and even customizable. Maybe a variable could be defined in script(better in cs), to controll this delay time?
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom Delay Time before Continue?

Post by Tony Li »

Hi,

When the typewriter is done, it sends the sequencer message "Typed".

Your sequencer commands can listen for this message. For example, to delay 2 extra seconds after the typewriter is done, use this Sequence:

Code: Select all

Delay(2)@Message(Typed)
If you require the player to click a continue to advance, and if you want this line to automatically advance instead of waiting for the player to click continue, use this Sequence instead:

Code: Select all

Delay(2)@Message(Typed)->Message(Delayed);
Continue()@Message(Delayed)
If you want to delay for a variable amount of time, define a Number variable in the Dialogue Editor. For example, say the variable is named "DelayDuration". Then you can change the original Sequence to:

Code: Select all

Delay([var=DelayDuration])@Message(Typed)
gamefang
Posts: 4
Joined: Thu Sep 07, 2023 4:07 pm

Re: Custom Delay Time before Continue?

Post by gamefang »

That's the best way, thank you very much!

I replaced the Default Sequence in Dialogue System Controller:

Code: Select all

Delay([var=DelayDuration])@Message(Typed)
so the player can select:
1. seriously reading:
- Continue Button -> Not Before Response Menu(must click)
- DelayDuration -> 0(no need to wait)

2. casual reading:
- Continue Button -> Never(automatic continue)
- DelayDuration -> player customize(depends on reading speed)

already tried and everthing was working good!
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom Delay Time before Continue?

Post by Tony Li »

Glad to help!
Post Reply