timer won't start!!!

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

I was trying to do something and for some reason the timers don’t work if the if testament is checking numbers or true/false, does anyone know how to fix this or why is this happening?

extends Node2D

var woooh = 1

func _process(_delta):

  if woooh >= 3:

  if Input.is_action_just_pressed("ui_accept"):
	 woooh += 1
	 print (woooh)

func timeout():
  print ("lol")
:bust_in_silhouette: Reply From: kidscancode

In order to detect when the Timer ends, you need to connect the Timer’s timeout signal.

In your code you just defined a timeout() function that is never called.

Examples in the docs here:

They are connected

thedumbguy2 | 2022-02-06 17:25