Why replicate variables in GameMode

Hello,

I have been using UE4 for more than a year but there are still some things that escape my understanding.
I am making an online multiplayer game, and I watch this series of videos : https://youtu.be/D6QtvPrqNLg?t=27m32s

The person that did this tutorial replicates all the variables in his GameModes. What is the point of this ?

I thought the GameMode was only present on server.

You are completely right. The whole tutorial series has it’s flaws. You should definitely check out this forum post, where some of the bigger community members correct the tutorial.

The is no point in setting variables to replicate on the GameMode as the GameMode only exists on the server. If you need to replicate variables in your GameMode, put the replicated vars in the attached GameState that is replicated to all clients.

Do not put any character specific variables in the GameState. Character specific replicated variables should be in the Character.

1 Like

Just what I thought, thank you :slight_smile:

OK, thanks for the precisions :slight_smile: