Stopwatch timer in godot4

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By TrippleDLee

I’m trying to create a timer that counts the seconds/mins the since the scene has started. I tried using:

func _process(delta):
time += delta

but that isn’t working anymore.

What’s not working here? There’s an indent problem above, but I assume that’s only in the formatting of the post…

Assuming the time variable is defined at the script level (and it must be since it’s not defined in your _process() function), that should work…

jgodfrey | 2023-04-01 01:42