Inconsistency with default timer timeout?

Godot Version

Godot v. 4.2.2

I’m trying to follow the basic 2D tutorial game as I’m new to Godot, but I have very minor experience in other things like Gamemaker. Part of the tutorial 2D game is having a timer that ticks up a score variable every second(?) based on a timer node called ScoreTimer and the timeout signal associated with it. Below are the sections of code related to the Score Timer.

func update_score(score):
	$ScoreLabel.text = str(score)
----
func new_game():
	score = 0
	$StartTimer.start()
	$HUD.update_score(score)

func _on_score_timer_timeout():
	score += 1
	$HUD.update_score(score)

func _on_start_timer_timeout():
	$ScoreTimer.start()

The issue that I seem to be having is that the score timer inconsistently moves at double speed. I’ve tried recreating it but I can’t do so consistently. I do, however, have a video of it happening.
Video Link (Top right # is an interval timer I made [ignore the initial value I didn’t set it up to start properly], top middle value is the score timer.)
Anybody else experience something like this? I can give more code or info if necessary. Thanks!
image

I’ve never noticed that strange behavior before. Is it possible that two of your timers have their signals accidentally connected to the same function?

If the problem persists, I would just tie the score to the game time and have it reflect how many seconds have passed since the beginning of the game. You can get that info from the Time class.

1 Like