#Making a timer progress bar

7 messages · Page 1 of 1 (latest)

tacit hare
#

Hi I want to make a progress bar for my timer, but when I print the Timer.time_left, it only triggers every 5 seconds or so (when a timer starts)

I am not sure what I am doing wrong and would love some help!

pine path
#

Hi, I'm not really a master at GD script but I think it's because you updating your progress bar with the process function, I recommend trying the timer.timeout signal to update the progress bar every second.

tacit hare
#

Thank you! I will try that 🙂

sonic cedar
#

I think you want to move your print statement, and eventually updating the progress bar, to a process function instead of in the work at station pressed function.

tacit hare
sonic cedar
#

It is called by process but you need to update the bar regardless of if you input. And you currently only call on_work_station_pressed if you get an input.

tacit hare
#

ahh that makes sense! Thank you 🙂