Good day all, I read people set up there animation montage in 3 different methods. One, in a repnotify. Second, by making a custom event that transfers to the server, then another custom event that calls a multicast, and the animation montage is played on the multicast. Third, someone said to get true lagless animations you do method 2, but also add the play anim montage before any custom events are played as well.
For context, one of the things I am trying to do is play a reload montage and once complete it will reload a weapon that was picked up and can be later dropped.
RepNotify without info about starting time will cause the montage to be out of sync fairly often.
e.g. Reload montage is 2 seconds long.
Player #1 starts reloading 10 seconds into game.
The delay of sending montage request to server and then to player #2 means that for player #2, the montage starts playing 11 seconds into game.
Montage for player #1 finishes at 12 seconds.
Montage for player #2 finishes at 13 seconds.
With custom struct/event, when the montage started playing, what section it is in, what section it should be in next etc is included.
Then it doesn’t matter when the next player gets it, it’ll play from the correct point in the montage and end at the correct time.
A multi-cast has the same issue as a rep notify, except anyone who is not relevant when the multi-cast is called doesn’t see anything if they become relevant shortly there after.
This is fine with short, quick non-gameplay relevant animations, but for something like a reload etc, not so much
My understanding is you just gave a fourth option, is that correct?
With custom struct/event, when the montage started playing, what section it is in, what section it should be in next etc is included.
Then it doesn’t matter when the next player gets it, it’ll play from the correct point in the montage and end at the correct time.
If this is a fourth option, could you provide an example image(s) of how to set it up so that sections are synced as you were talking about?
Assumed custom event included a struct of some kind.
System we use is C++, so kinda hard to share as images
It is pretty much just a struct that holds the montage, time it started playing, section name etc.
When that reaches a client, it’ll start the montage and jump to the correct position based on the time it is now vs. the time it started playing etc.
Pretty much the same as how gameplay abilities handle montages.
The following tutorial explains how to replicate animation montages without using remote procedure calls. Here RepNotify method is used. The system also account for the network delay by adjusting the start time of animation montage. How To Properly Replicate Animation Montages