0 votes

I tried using Timer node, but it seems like it doesn't work.

asked Mar 4, 2018 in Engine by ExiledBeast (25 points)

1 Answer

+1 vote
Best answer

You didn't include anything about what you tried or what "doesn't work". The Timer's timeout signal is probably what you want.

Make a scene with a Timer and a ProgressBar. Add a script and connect the Timer's timeout signal. Here's a snippet that takes a ProgressBar and counts it down a second at a time:

func _on_Timer_timeout():
    if $ProgressBar.value > 0:
        $ProgressBar.value -= 1

The Timer's "Wait Time" is set to 1 s
The ProgressBar's "Min/Max" are set to 0/30, and its "Value" is 30.

answered Mar 4, 2018 by kidscancode (17,770 points)
selected Mar 5, 2018 by ExiledBeast

Thanks. It works now.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.