Replicate Character AnimMontage to all clients using C++

Hello, i want to replicate an anim montage of a client’s character to all of the other clients using C++. The only way to achieve this is using replicated boolean values and track the state of the character? For example:

UPROPERTY(Replicated, ...)
bool bCondition1;

UPROPERTY(Replicated, ...)
bool bCondition2;

void MyCharacter::Tick(float DeltaTime)
{
     if(bCondition1 && bCondition2)
         PlayAnimMontage(...);
}

I’ve checked other threads about this like this thread but he didn’t say what he did to solve it and it’s for blueprints.

Still need help with this?

yes please

Basically i created a netmulticast function called MulticastPlayAnimMontage which simply calls ACharacter::PlayAnimMontage with the same parameters. On the server side i check the conditions, and if they are true i call MulticastPlayAnimMontage, and that will play the anim montage in all clients.