Page 1 of 1
Custom Delay Time before Continue?
Posted: Tue Nov 14, 2023 8:55 am
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 (9.32 KiB) Viewed 496 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?
Re: Custom Delay Time before Continue?
Posted: Tue Nov 14, 2023 8:59 am
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:
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)
Re: Custom Delay Time before Continue?
Posted: Tue Nov 14, 2023 9:37 am
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!
Re: Custom Delay Time before Continue?
Posted: Tue Nov 14, 2023 10:27 am
by Tony Li
Glad to help!