AI and animation


I have done an AI, it is working well if we are server but not well if we are client. In fact, the client don’t see attacks animation of AI (only the server see it). To play animation I use montages, they are played in a blueprint that is called in the AI tree when it is time to attack. What can I do to make the client see that the AI is attacking ?

Thank you ! Kind regards

please dont post duplicate threads, you posted the exact same thing 2 hours prior. by making more of the same thing it will take longer to sort through your issue and will make it more difficult for people in the future if they have the same issue.

I solved my problem !
So, I am not sure that my solution is the best way to do that but I do the following things and it works :

-in my case, the problem was that when the AI attack it was supposed to play a montage of the animation. And this was supposed to be done in a behavior tree task. Only the server execute this task and so only him can see the AI playing the animation (it is what I understood, correct me if it is not exactly the case)

-to make the client execute the animation, I play the animation montage in the AnimBP of my AI. In fact, in the behavior tree task that is execute when we attack, I delete the original play montage node and replace it by setting a variable “IsAttacking” in my BP_AI. I replicated this variable.

-In the AnimBP, I test if this variable is true. And when it is then I play the montage. I only do it once to be sure he is not playing it each tick and blocking. Then after the montage is played I set is attacking to false.

So, it works like that for me but as I said it is maybe not the best way to do it. If anyone have a better solution please post it.

(I am sorry for the double post but I wasn’t able to find my first post so I though that it wasn’t posted)