I have an issue where all areas belonging to a component called detection trigger when the parent enemy is queue_free.
The problem arises because i have an Area2D which teleports the entity back to the players position if its an ally. This procs when exiting the range area.
When i free the enemy, ALL areas of detection component trigger not just the teleport one. I've tried things like:
if enemy.is_queued_for_deletion() in the signal to no avail. All signals still proc, causing errors such as the dying ally teleporting to my location as if it exited the range and many more with the other on_area_exited signals.
How can i prevent all exit signals from triggering when i queue_free the enemy?