On Start of Layout
Similarly to the official example, add a client value with "AnimationState" tag. This will allow synchronization of instance variable possible between the host and peers. Then, sync your object's instance variable with the tag that we have created before.
Insert setbit action for the host's character's instance variable [AnimationState]. This is exactly similar in how you recorded the movement input for real-time multiplayer. This part can be unnecessary because this only record the setbit for host's character only, depends on case by case.
However, in this tutorial, this is done so that the Character object will have a synchronized state amongst all peer in the host session for consistency.
The host will get updated with the instance variable, so in this event, the host will overwrite the current instance variable's values for each Character.
Very similar to setbit for movement, setbit for AnimationState is setup according to the input state. These setbit will be used to control local animation.
We're almost finished here, so the last thing you have to setup to make your animations are synchronized throughout the multiplayer session is obviously to animate each of the character. In this event, since we have updated all the character's AnimationState instance variable, we can safely use the getbit from the instance variable as the condition for the animation. The animations were named according to key control.