Animation BP for actors

Hi, i want to use an animation BP for my enamy actors but when i spawn the actors just the first one are playing the animation and the rest of actors just copy him. What can i do?

What do you mean? They are copying him and playing the same animation? Whats the issue? If all actors and being animated then the anim bp seems to be working. It could be an issue with how you programmed states if they are playing an anime they arent meant to be. Without a better description of whats happening how are we meant to help

I use a collision box to start the animation when the player is close to actors but this stuff work just for the first actor

And if the first actor starts the animation the rest of actors just copy him

Its gotta be an issue in your blueprint script but wihout seeing how you set thinns up its hard to say

In actor BP i set a variable to true when player character begin the overlap and false when over the overlap. In animation BP i cast the variable from actor BP and with her i set a new one that i use to ener the state.

Create a new project and re-create the problem. Zip Config and Content folders along with the .uproject file and upload here.

Are you making sure that the player is the one overlapping? If both are pawn and you didn’t check either through casting or through a tag, the enemy could be triggering the animation and not the player.

Try this:

1 - disconnect the BP animation update in your animation BP (this means the event graph will do nothing)

2 - on the event overlaps, get your mesh → Get Anim Instance → cast to ZombieAnimation → set Can attack.

So basically, your actor BP will set directly the canAttack variable in your animation BP.

Something like this:

Don forget to disconnect the update event in the event graph in your animation BP.

Thanks dude it works!

Just to add one more comment.

If you wanted to keep the logic in the animation BP’s event graph, you should have used something like this, instead of all that “get all actors” mess:

Did that fix the problem? Because there is so much wrong with the rest of it…