Download

2 sphere colliders cause infinite loop for some reason when overlapping with each other

I’ve got a problem with my blueprint which is causing me a headache. Its spawning 2 sphere colliders at different points, one as a component and another as a sphere trigger.

Its spawning one sphere component at the beginning of play, which will trigger an event when a specified target is in the specified melee range. That event is currently empty because i haven’t written it yet.

I have another sphere trigger being spawned at the last known location when the AI loses sight of the target. When overlapped, it switches the state of the NPC and then immediately deletes itself.

As soon as these 2 colliders meet, they cause an infinite loop. I have tried unplugging all nodes from these 2 events, and I initially thought the infinite loop was a product of calling the same repnotify function that called it; i have disconnected that repnotify to no avail.

Even with no nodes attached, the simple fact that it is spawning 2 sphere colliders which are overlapping with each other is somehow causing an infinite loop. And I don’t know how to fix this because its not like I can make them just ignore each other, that kind of code would have to be added AFTER the event is already called.

I know the program thinks its triggering an infinite loop, but I am almost certain it is not; destroying the actor that caused the collision event would ensure it only triggered once. This is a very weird bug.

EDIT: I should note I’ve added a cast node after both events to ensure what is overlapping is a pawn and not another component. Does not help, this bug happens at the event level.