Sorry, you said you got it working? I’m not sure I’m following what you’re trying to add now? You said it’s not tracking the closest one? I think that has to do with your sensing component with its sensing vision. It won’t be able to detect anything behind it unless you also use hearing. At least, I think that’s how it works.
Assuming two actors are within sight, then during the “On See Pawn” event, you need to check if that pawn is closer than the pawn you’re currently chasing. If so, set the current actor to the pawn to be chased and call “AI Move To” again (or ChasePalyer). You’ll have to check that the actor is not dead before calling “Chase Player” if that’s what you’re using.
edit: And set ChasingPlayer to false before calling ChasePlayer.
I’d add a check if the Pawn pin on “On See Pawn” is the same as TowerReference, don’t do anything. But if ChasingTower is true AND Pawn is closer, then set ChasingPlayer to false and continue as usual.
You likely also need something to notify you or check that when the tower is dead, that you reset your variables. So in “On See Pawn”, you probably want to check that if the Tower Reference is dead, then set ChasingTower to false so that you can chase a different tower.
I’ll try to post a BP. Give me a moment.