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
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
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).