#Issue with multiple turrets not firing when enemy is in range of both

3 messages · Page 1 of 1 (latest)

hollow ridge
#

I'm encountering a problem in my Godot project with multiple turrets. Each turret has its own CollisionShape representing its range, and they should start firing when an enemy enters their respective ranges. However, I've noticed that when an enemy is within the range of both turrets simultaneously, neither of them fires.

I've checked the CollisionShapes and they seem to be set up correctly. Additionally, when there's only one turret, it fires as expected when the enemy is within its range. It seems like there might be a conflict in the firing logic when both turrets detect the enemy simultaneously.

ONE TORRET and TWO TORRETS VIDEO ATTACHED.

Could someone provide insight into how I can resolve this issue? Should I adjust the firing logic to handle cases where both turrets detect the enemy at the same time, or is there another approach I should consider?

Any help would be greatly appreciated! Thanks in advance.

void oyster
#

i dont know why, but in your second video your enemies dont have any object groups and thats why the bullet code doesnt run. in the first video the console prints ["Enemy"]