Make the IA move to the closest "safe zone"

Hello
I looking for a way to make my IA run to a “safe zone” when they saw a ennemy
But they will be more than 5 safe zone on the map so i need to make the IA run to the closest safe zone
Thank you for your attention ^^

Think about what do you mean with “closest” safe zone and how a safe zone is defined. I mean, do you want the safe zone that has the closest center to the AI, or the just the closest vertex? Is the safe zone defined by a set of vertexs? Once you have defined the problem it will be much easier to figure out a solution

Hey Cyadic,

Take a look at EQS doc: https://docs.unrealengine.com/latest/INT/Engine/AI/EnvironmentQuerySystem/UserGuide/

You could make an EQS that searches for all save zones in radius and then do a distance check for the closest one.

Hope this helps :slight_smile:
Elias

Thank you Elias that was exaclty what I was looking for ^^
That will definitely help me