Need help with timer syntax
reddit.com·7h·
Discuss: r/godot
Flag this post

Hey all, I’m making a game where I’m trying to code an animation whenever you click on an object. Specifically, when you click on the object, it will go to the center of your screen, wait a second, then slowly fade out.

For the part where you wait a second, the code is here:

if global_position == Vector2(525,325) && GoAhead == false: #Checks if the object is in the right spot, and if it hasn't done this already
$Sprite2D/Sprite1.self_modulate.a = 0 #Changing from one sprite to   another
$AnimatedSprite2D.self_modulate.a = 1
$Timer.wait_time(1)
GoAhead = true

However, when I run that code, and get to the part where the timer is about to trigger, I get this error message:

E 0:00:01:772    _process: Invalid call. Nonexistent function 'wait_time' in base 'Timer_'

I kno…

Similar Posts

Loading similar posts...