Setup timer slider

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Setup timer slider

Post 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!
User avatar
Tony Li
Posts: 21975
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setup timer slider

Post 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.
Post Reply