How to make it were if the AI fails to

Ok, in my game i have it were the ai attacks you, but i need to know how to make it were by closing a door, the ai cant get you, therefore making go back to another area.

Hi CadetDraeGaming,

I believe what you are looking for is the Environment Query System. You can find documentation on that here:

It is thanks!!