- Edited
I am struggling to figure out how to use a timer.
I just added this timer code:
var timer
func init():
timer = Timer.new()
add_child(timer)
timer.autostart = true
timer.wait_time = 4.0
timer.connect("timeout", self, "timeout")
I get this error:
Invalid type in function 'connect' in base 'Timer'. Cannot convert argument 2 from String to Callable.
Not sure why as this is right out of a tutorial...
Any help is much appreciated.