Making character animations replicate through multiplayer

Hey Guys

I am very new to UE4 but i am doing my best to learn BP because i am very bad at programming using C++

One thing i cannot get my head around is animation relevancy for the main character, basically i have a switch which i created using this tutorial:

Now the animations work perfectly on the client and if i was creating a singleplayer game i would be very happy but i want to create a multiplayer game and when i load it, the normal animations replicate fine (walk, run, idle) but when i press Z to switch to combat mode, it does it ok on the client but on the other clients it looks like heā€™s still in the idle pose

I have set all the variables to Replicated but i have no idea where i am going wrong, as i say iā€™m very new and iā€™m sure itā€™s something simple iā€™m missing but i canā€™t find any information about changing character animations for multiplayer

Appreciate any help

Thanks

Setting up Multiplayer correctly in UE4 is currently a little daunting. Iā€™d highly recommend purchasing Michael Allarā€™s GenericShooter (if you can afford it, itā€™s $20 currently thru Unreal Marketplace). GenericShooter does alot of the stuff youā€™ll need in a multiplayer game (Lobby, Scoreboard, Animation replication, Physical materials, etc) and itā€™s 100% blueprints. Short of that, you could also checkout the Multiplayer shootout game which lacks alot of the typical things you need for multiplayer, but itā€™s free.

In order to replicate animations your character has to have itā€™s movement replicated and also be set to replicate. I donā€™t have access to my dev machine now, but it is under the character blueprint.

Multiplayer in UE4 is actually not that daunting and is fairly straight forward once you understand the basics. I have successfully set up replication on ā€œTop Down Templateā€ from Epic for Kaboom Arena and just recently did the same on the ā€œFirst Person Templateā€ from Epic for Re-Spawn.

Replication really is not daunting, as long as I am not editing someone elseā€™s blueprint, I can easily do a lot with replication without thinking too hard about it. Note for everyone else, I was looking at this guyā€™s blueprints for around an hour and I was completely stumped, there were things like multicast and ā€˜Run on Owning Clientā€™ events being executed during Remote on a switch has authority, and a few other things that I really had a hard time understanding.

Yeah ā€¦ without derailing the thread ā€¦ I had the same issues with these blueprints. I have since gone back to basics and set up the blueprints in my own way from a fresh start.

But as you stated, setting up Networking and Replication is actually not that much of an issue. I wonder if I should do some tutorials adding replication to the various templates from Epic in an effort to help some users.

@anonymous_user_db8aa5cb ā€“ please let us know if you have come right with your original request or not so that we can help you more. 8-}

Iā€™m having the same trouble in my case. I have replicated booleans that describe whether the character is crouched, standing or prone. Those variables also control my animation blueprint, and theyā€™re set through a Run on Server event. The same thing happens. Hereā€™s a link to my question in the AnswerHub: answers.unrealengine.com/questions/271955/replicating-animations-aim-offset-and-setrelativel.html

1 Like

I like this tutorial very much and had the same issue with replication. This is what Iā€™ve changed so far in my ThirdPersonCharacter blueprint to get this work in multiplayer. Iā€™m setting IsCombat (which is now RepNotify) via custom event (only) on server and ā€˜Orient Rotation to Movementā€™ (only on server) as well and afterwards fire a further custom event as multicast for all which is finally executing that interface function for the anim blueprint. You could ignore/remove that EventOnMovementmodechange and IsFalling stuff on the screenshot - itā€™s basically a first try to get rid of that combat mode if the character is falling from an edge but Iā€™m not sure if I leave it that way or mix the falling animation with the combat animation via layered blend per bone in the anim blueprint instead afterwards. Iā€™m even not sure if there is a simpler way to spread that ā€œOrientRotationtoMovementā€ for all (I tried with a multicast at first but it did not work like expected so I leave it that way currently).

Replicating the booleans helped me a lot. Thanks