I now have my AI follower chasing me all over the place and I’ve successfully imported a Mixamo character and animations. It all works fine but… My char moves from idle to walk to run nicely but when it catches up with my stationary player the animation returns to idle. Which is exactly what I have told it to do in the animation blueprint and blendspace.
I now want the “attack” animations to take place. But how!?!?
There are a few ways to do it but the best one for you at this point in your evolution is probably “animation montages”. is a good tutorial from Epic but it’s old so you will have to either use the engine version they do or adapt your implementation to the newer engine. And what you want may be a few videos into the tutorial. I gave you the first episode.
But now you know what to look for, so you can also search for other videos. I still watch the most basic tutorials just to see if they do something I never knew about. Learning UE4 is pretty organic so it’s easy to miss a lot, actually.
To be honest I was hoping for a more specific answer. I have created an animation BP for my imported character - a nice vampire from Mixamo. I have created a blend for the start-up to run animations including a BP to get the direction / speed. I have a BP on the AI Character that destroys it with explosions when shot a given number of times.
I think I’ve figured out that I need to add/amend one of the existing BPs to recognise when the vampire is close enough to the player to go into the attack animations, then back into idle. Just not sure how to refer to the animation sequences from a BP.
Hope this gives a better idea of where I am in my evolution - yes I know I am no expert!!
Thanks for getting back to be - feared I’d been a bit rude. I’m using a behaviour tree for my vampire to move around and chase - based on the tutorial https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/1/index.html. So the vamp idles, detects and chases then stops when it catches up. I’ve replaced the mannequin with my imported vamp and have created / started the animation blueprint.
Getting the AI to attack at the right time but not the wrong time
Turning attack on and off
Sounds to me like you’re asking the second one so you should look into “AI Tasks”. They let you add custom functionality to the BT (such as turning attack on and off). Check out and ask any questions you still have.
Getting the AI to know it’s time to attack can be done a few ways and it can get complicated. I’ll leave that one until you ask it explicitly.