Try behavior trees visualization, even if not using the API. Think about alot of cases that go in a tree like structure.
1) Firstly
The AI Firstly goes twoards the ai if there is a certain distance…
Once in the actual like ‘striking distance’ the ai needs to find a certain way to interact with the player and actually schedule attacks. For example when it actually stops based on the actual distance vector, you can attack differntly. and you can have different weights of random-ness based on distance.
Reactions. aswell, reactions for AIs Can be instance. but based on a skill or reaction variable you have to make them wait from actually reacting to changes inn the position and the actual striking distance.
Eh, heres me just pouring my thoughts into how you would do it|
Heres the Behavior Trees!