As WCode asked, I can provide some examples to point you in the right direction(note that this code is “free-handed” and haven’t tried to compile it, but you should be able to get the idea)
First off lets define our replicated variable and function that will be called on the client and be replicated to the server. Put this in the header file where applicable.
/** If this is true, the character should use the dance animation */
/** Called on a client to tell the server to start the dance animation */
Now in the .cpp file we will implement the replicated function
void ADancingCharacter::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
//Make sure to set up the bool for replication
//Check to make sure that it is not illegal for the character to be dancing right now or something (cheat prevention)
//For now we will just return true because this is an example, and you may or may not need true validation depending on what you are doing
bShouldDance = true;
Hope this helps! Let me know if you have any questions or if this doesn’t work for some reason. If needed I can help you out more in depth via Skype!