Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Michael11 |
Hello guys,
I am trying to use signals for node_groups and somehow getting an error.
This is what I have in the config section in one of my scenes:
onready var enemy = get_tree().get_nodes_in_group("enemy")
Then in ready function in the same scene I have this:
func _ready():
enemy.connect("enemy_killed", self, "_on_enemy_killed")
When I try to launch the program I get this error: Nonexistent function connect in base Array.
When I use it just for a single node, it works fine. Once I use it for a Group where there are more nodes, it gives me this error.
Why is that? Thank you