Hi, I hope I can get some help with my question. I’ve seen similar questions here, but most of them don’t seem to have received an answer.
I’m currently learning about Replication and Multiplayer using Blueprints. I’m facing an issue with replicating animations on the client side. When a player picks up an item, it correctly attaches to their hand, and other players can see this. While the pick-up animation works for the player themselves, the server cannot see the client’s animation, but the client can see the server’s animations.
I’ve tried different methods of replication, but I still can’t get it to work. I’ve been searching YouTube and other forums about replication and RPCs, and I’ve tried to apply those solutions in my Blueprint, but nothing has worked so far.
I’m not sure what I’m doing wrong.
I’ve attached screenshots related to my issue:
Screenshot 2 shows the inside of my RepNotify function. This is when I tried using RepNotify for the animation, but the result is shown in Screenshot 1.
Screenshot 4 is when I attempted to simply set the variables to replicate.
Screenshot 5 shows the inside of my Get Inventory Item function.
I’ve also set all variables to replicate and actors as replicate.
What I understood about replication before was quite similar. The server would replicate down to the clients, and I also understood that the client could tell something to the server, which the server would then pass down to all.
I tried copying what was in the screenshot you submitted. I made my pickup system as a function, which is the “Get Inventory Item.” I’m not sure if that affects the code, though.
My problem is that my animations are in a Blend Space and not an Anim Montage. You used an Anim Montage to trigger the animations, but I used an Enum, “E State,” to represent different states of my animation. The item has an “E State” in it, and when it’s picked up, the assigned animation for that “E State” will play on my character.
Is there a way to do something similar, but using a Blend Space?
Same logic applies to blueprints. Server does not have to know about animations.
You also don’t have to pass around a reference from client to server about who does what, it knows from which specific actor instance the RPC was called.