link: https://docs.godotengine.org/es/latest/getting_started/step_by_step/signals.html
I am following the tutorial to the letter, but I always keep getting this error, I consulted it with gpt chat to find a solution but nothing. it's driving me crazy
code:
extends Sprite2D
var speed = 400
var angular_speed = PI
func _ready():
var timer = get_node("Timer")
timer.connect("timeout", self, "_on_Timer_timeout")
func _process(delta):
rotation += angular_speed * delta
var velocity = Vector2.UP.rotated(rotation) * speed
position += velocity * delta
func _on_Button_pressed():
set_process(not is_processing())
func _on_Timer_timeout():
visible = not visible
errors: Línea 8:Invalid argument for "connect()" function: argument 2 should be "Callable" but is "res://Sprite2D.gd".
Línea 8:Cannot pass a value of type "String" as "int".
Línea 8:Invalid argument for "connect()" function: argument 3 should be "int" but is "String".
En esta lección, veremos las señales. Son mensajes que emiten los nodos cuando les sucede algo específico, como que se presiona un botón. Otros nodos pueden conectarse a esa señal y llamar a una fu...