My AI takes forever to actually start chasing the player. It seems to take the same amount of time, every time.
How can I make it so right when the player is seen, state goes to Chase?
Here is my setup
I am printing values for whenever I am in distance and in view angle (55 degrees)…these values appear and keep printing whenever I am visible and go away whenever I leave sight.
But it still takes forever for the AI to move to me! He keeps wandering!
How long is forever? 0.5 seconds? 10 seconds? Also, make sure the nodes in your trees are set to abort. Also, calling Stop Movement whenever switching states helps.
Abort Self worked. I had it checked and it didn’t work so I had unchecked it. Finally it worked once I checked it again.
I’m having a little more trouble with Idle and Attack states.
On AI Activation, Enum is set to Wander. If the player is in distance and sight angle, Enum is set to Chase. These work.
I can’t get Idle to trigger when the MoveToRandomPoint finishes. If I change Enum to Idle before the Finish Execute inside the MoveToRandomPoint Task, it does nothing. I only am able to get setting Enums to work inside the BTS_VisionCheck Service.
Also, Attack won’t trigger because I can’t set it to fire when distance is at a certain point.
I would like to be able to force Idle and Attack animations to finish before repeating or moving to other AI Tree Branches. Can I also force Idle to play the length of my idle animation (or at least set it manually inside AI Tree to the length of my animation)?
And force Attack to play at a certain distance? Attacks that play should interrupt moving, but should still aim towards the player.
Here’s my Task:
My Tree: