- Edited
I am making some sort of bullet grazing system and for very specific reasons, I don't want the player to be able to graze multiple bullets at the same time, so I tried to pick the closest bullet on the graze's area2D but I haven't found a solution for it.
This is the code that I am using for checking graze:
func grazing()
grazedBullets += 1
print(grazedBullets)
func _on_graze_area_area_entered(area):
if area.itsGrazed == false:
grazing()
area.itsGrazed = true
I also tried searching code for checking instances but I didn't know how to applied them on an area2D.