All characters are playing my animation

Hi,

I’m working on a multiplayer game, and I have this issue going on:
sync_anim

I’m not doing anything special, just using the third person animBP, and setting a variable in the player controller, based on which I’m running a state machine. I’m not replicating any variables. Any ideas why this would happen?

Thanks!

Hey @claaudius!

Hmmmm… can you show the details of that variable in your controller? Maybe make sure it’s instance editable?

Nothing special… I have tried making it instance editable, but it’s not doing anything.

I’ve tried with a new clean project (5.4), but I have the same issue

in ABP_Manny:

in my player controller:

and the state:

Player character only has the mesh added, nothing else changed.

I’ve moved the variable in my player character and did this in animation blueprint which seems to work:

However, I’m still confused on why I can’t just use “Get Player Controller” or why it’s controlling all the characters. What’s going on there?

There it is: You’re doing a “Get Player Controller” for player index 0 in your Animation Blueprint. That’s first player controller. So every player’s animation is going to try to get that. Try to avoid anything grabbing “player index” on network games.

You want to use “Try Get Owner” and then “Get Controller” then cast to your TEST_PlayerController. I think that should do it.

Thank you, sir.