@Zelta said:
add the enemies to a group ("BadGuys") and then:
if body.is_in_group("BadGuys"):
count +=1
Okay, so after a few tries I havent figured out how to put your piece of code into mine.
As you can see, my enemies are in a group

1)If I try to put it this way:
func _on_Area2D_body_entered(body):
if "Bullet" in body.name and body.is_in_group("Bad_guys") :
count +=1
queue_free()
print(count)
They dont die and counter doesnt work
2)If I try to put it this way:
func _on_Area2D_body_entered(body):
if "Bullet" in body.name :
queue_free()
if body.is_in_group("Bad_guys"):
count+=1
print(count)
Enemies will die but counter doesnt work
Even if i try to only put :
if body.is_in_group("Bad_guys"):
count+=1
print(count)
The counter will start counting enemies only for appearing on scene and being hit too but will not die, so I have no Idea how to structure it , sorry for too much text xD