Client Prediction for replicating Anim Montages

Does anyone have an example of how i can do Client Prediction of playing animation montages? I am trying to make it so some played anim montages on my prototype are controlled by the client, so they feel responsive to the client no matter what are the network circumstances, but i don’t seem to be able to find useful information in the subject, i was trying to store as many aspects of the anim montage as i could inside a Struct with a few variables, but was having trouble figuring out if the struct was replicating or not, as i couldn’t find a way to set it’s replication and the information i found online was conflicting.

You can use gameplay ability system. Check this, I recommend you to watch the entire video.

Client-side prediction (CSP) is “executing logic and/or action locally on input”.

Look at the Character movement component (CMC). Movement input is executed locally immediately on input. Then commands and results are sent to the server. Server replicates the inputs logic and gets a result. It then compares the results. If its result is different it sends a correction to the owning client. The result it determines is what is sent to other clients.

Let’s take a punch montage as an example. You press an input. The Punch is immediately executed locally, then a RPC[run on server] is called. That’s how you get your “responsiveness”.

The result of the punch comes from the server. You can add local effects to increase immersion and the feeling of responsiveness.

In this example you aren’t “Replicating” anything. Just a simple event call in a packet.

Client Punches and tells the server to Punch.
Server Punches and tells everyone else to Punch.