- Edited
I have a bullet scene that is trying to see of an enemy is in a certain group. the group was made in a enemy wave generator scene. The bullet can interact with the enemy by the name of their node buy not by the scene:
from bullet script in bullet scene
this does not work:
func _on_bullet_body_entered(body):
if body.is_in_group("marblez"):
print(body.get_name())
body.queue_free()
but this does:
func _on_bullet_body_entered(body):
#if body.is_in_group("marblez"):
if body.get_name()=="yellow_marble":
print(body.get_name())
body.queue_free()
How am I handling the groups wrong?