Download

Setup variable on server, get it on the client

Hi Guys,

I’m making a multiplayer game where in the begining of the game a code gets generated. Its a four digit code.
I want this to only run on the server when the game starts.
However, how do I get this variable on the client when they join the game?

I got it working that the code only generates on the server.
But how do I sync the code when a player joins the game?

All of this is not on the player.
Blueprints below:
Symbol Puzzle BP

Symbol Puzzle Controller BP
Each cube wil generate a random number between 0 and 9.
The cube will grab a material from an array with the corrosponding randomly generated number.
The controller just grabs the number from all cubes and then creates a code.