I have created an AI Guard that if it sees the player, it will do a quick distance check,
Then based off that result it will either investigate by moving to the player or start shooting at them if they are under the required distance.
Very simple stuff.
**The issue **I have is that because AI perception is only activating upon re-detecting the player, if the guard is not close enough to attack he will choose to investigate,move to the player
and not attack unless AI Perception looses sight and reacquires the player again.
**The result I want **Is for the guard to approach the player and as soon as he is under the required distance then trigger the attacking mode.
I have tried to run a tick event through a gate, that gets opened when the guard starts the investigate move to player part. So the following distance check is constantly being updated on the approach, Instead of waiting for AI perception to activate, but not had any luck getting it to work yet
Anyone got any advice or solved this in a efficient way already ?