AI animation

I want to know how to setup my AI for when he is walking around when he sees the player he stops plays another animation in place and then resumes walking to attack the player…i have everything setup already for him to be running around and when he sees the player he runs straight for him but i want him to see the player “pause” play another animation and then “resume” chasing after the player

Hey there, are you using Behavior Trees? If you are, before doing the Move To node, execute first your own custom task that plays the pause animation, after that execute a Wait node with the duration of the animation, only after that do you use the Move To node. That way when he sees the player, he plays the animation and waits for x seconds and only then does he move to the player.

So how do you move the AI, with the AI Move To node? If that’s the case play an animmontage and do a delay before running the AI Move To Node.

all my animations are being ran thru blueprints animation blueprints…and i have no behavior trees

correct and the animations such as run and idle are held within the animation blueprint

So either set a boolean to trigger the pause anim to play in the animation graph or play an animation montage, then set a delay with the length of the animation, and only after that do you execute AI Move To.

ok i will try that thank you

Let me know how it goes :slight_smile:

it sadly doesnt work later today i will upload a picture of my code i have for the animations