Godot Version
4.2
Question
im following Heartbeast’s action rpg tutorial part 22.
connect()
is different in gd4 so i had to come up with a solution of my own and i dont think i succeeded.
extends AudioStreamPlayer
@onready var playerhurtsound = $"."
func _ready():
playerhurtsound.finished.connect(definitely_not_queue_free())
## making this function fixed the error in the editor but not in game. probably because it kills this scene
## rather than responding to a scene being killed or something like that.
func definitely_not_queue_free():
print("help me")
queue_free()
it spat out the error message Invalid type in function 'connect' in base 'Signal'. Cannot convert argument 1 from Nil to Callable.
im so sorry if this question may sound stupid, i’am genuinely just stuck