Unable to replicate animation state machine in spite of controlling variable being replicated.

Hello everyone,

I have a simple state machine plugged pretty much straight into my output pose.


The state machine is one of those matryoshka setups where the states in the state machine contain other state machines within them. Regardless, the first/main layer, the “master state machine” -that decides whether to use the state machines for “unarmed”, “pistol”, or “rifle” -is controlled by a single variable. The variable is a fully replicated enumerator set in the pawn blueprint. To enter a state, you must have E == N, to exit, E != N, pretty simple, right?

I have fully verified that the variable is replicating across clients. The variable is not at fault, nor is the method of setting it any issue.

I believe the issue lies somewhere with the state machine itself. But I don’t know what could possibly be going wrong. Can anyone “throw me a bone” as they say, and help me figure out why every player (other than oneself) is permanently stuck in the default “unarmed” state in spite of the variable that controls state changes being successfully replicated?

Kind thanks.

In the animation blueprint → Anim Graph: Create a Variable called HoldState (your enum).

Somewhere down the chain on your Event Blueprint Update Animation node Set this new variable using what the pawn class has.

Character Reference → Get HoldState…

Use this new variable in your transition rules.

1 Like

This works, but… why? I must say that I am a little confused, how come I can’t set the variables directly from my pawn onto the animation blueprint? Having the animation blueprint do a check-up every frame to see if a variable changed seems a little bit less optimal than just updating values on demand.

Regardless, thank you for the answer!