Suggested change to signal connect

Because signals are first-class citizens in Godot 4, instead of writing

enemy_instance.connect("died", _on_enemy_died)

you can instead use
enemy_instance.died.connect(_on_enemy_died)

1 Like

Good point, this is introduced later in the course! I wanted to teach the old way first and then introduce the new way to do it. Becuase its likely you will encounter the old way on the internet somewhere.

2 Likes

Privacy & Terms