Hi, I've got a strange problem and I'm not sure what holes in my logic are causing it. Basically, my enemies are set to pathfind to the player when they are in range, stopping and setting a new path every second or so or when they stop. However, if an enemy cannot find a path when that time arrives, it does not try again when the timer expires, instead this happens:
and it stays this way. After this, they stand still permanently. They still detect the player and the relevant "chase the player" variables still function, but the pathfinding itself does not.
I have a hunch this is happening because the enemies are solid or obstacles of each others' (so that they don't overlap), because it works just fine with I disable those behaviors. Thus, they try to path around each other to the player but cannot because other enemies are in the way, so they stop and then for some reason don't start again. Here is a big ol' image with all of the code for the enemy:
Any ideas as to why it's happening and/or how I can force them to recalculate? I thought I was already doing that with line 163 but perhaps not.