Page 1 of 1

Setup timer slider

Posted: Fri Aug 05, 2022 1:51 pm
by rauljl1
Hi, Tony.
I would like to setup the timer slider on the Dialogue UI. I don't know how to do it.
I want to assign by script the max time value and when the timer become 0 call a function/method in a script.
Thanks!

Re: Setup timer slider

Posted: Fri Aug 05, 2022 2:40 pm
by Tony Li
The included prefab dialogue UIs have a timer slider inside their response menu panels.

If you set the Dialogue Manager GameObject's Input Settings > Response Timeout value, the response menu will show the slider and count down. If the player doesn't select a response before the timer runs out, it will perform the action specified by Input Settings > Response Timeout Action. You can set this to Custom and assign a method to DialogueManager.customResponseMenuHandler.

You can also change the timeout value at runtime using the SetTimeout() sequencer command.