Welcome to the forums @gargara!
I generally use something like this in the projectile script to avoid having multiple overlapping enemies take damage:
extends Area2D
func _ready():
connect("on_body_entered", self, "projectile_on_body_entered")
var has_damaged = false
func projectile_on_body_entered(other):
# If true, then the projectile has already hit something and we can ignore
# this collision
if (has_damaged == true):
return
# Check if the body collided with is something we can damage.
if (other.has_method("hurt")):
# Damage the body and do anything else needed here (like sound effects)
other.hurt()
# Set has_damaged to true, so we know to ignore damaging
# anything else
has_damaged = true
# free it using queue_free
queue_free
The key is just to somehow track whether the individual projectile has already hit something and if it has, to ignore further collisions from it.