Hello all, I’m using a dedicated server, and I’ve been struggling for a week trying to create a solid workflow to keep the data from one level to another.
I have a scene where time is being counted, and each player has his own player info struct (player name, selected character, etc…).
After a round has ended, the game mode loads a new map (actually it’s the same map).
Here is my problem, I can’t seem to be able to keep any data from the previous scene to the current scene. Although I am sending the game state’s data using parameters in the “execute console command” (ServerTravel MapName?Var1=value1?Var2=value etc…). Then I’ve tried in both the “Event OnSetMatchState” and the “PostSeamlessTravel” (Created a C++ script for that to be exposed to blueprint) to set these parameters in the game state, although the parameters are being fetched and printed correctly, and saved successfully in the game state, but later on the variables have their default values. I figured maybe the game state I’m setting in is still the old one before the new one has been created? (just guessing!)
Same goes for the player state. I’ve used the “Event CopyProperties” to set the new data from the old player state into the new player state, and the data is correct if I print it out. But same as the game state, the variables later on are in their default values.
Can you guys please guide me to the proper way of initializing the values after seamless travel? So that I can respawn the players with their data and still have the game state’s variable values.
Thanks in advance!