Is there any way to transfer variables to Maps?

Maybe someone will be able to help me out.

There is an actor - Location_Actor in Map X:

  • He has information which map we should load,
  • He has information if he can open this map or no (bool - isEnabled or something like that)

The game opens map X and player can open Map Y from this actor Location_Actor

  • Game is opening map Y, information about the map have actor Location_Actor.

After completing playing in map Y, the game should go back to map X and let actor Location_Actor know that he can change his isEnabled to true or false - depends whats happened in the opened location.

I have a problem. When the game get back from map Y to map X he should update the actor Location_Actor variables. I’ve no idea how to optimally transfer this information because when the game get back to map X the actor will spawn again, the name will be different etc.

I could do this by hacking…all of Location_Actor should have a name, and I can find the name later on using Game Instance, but this sound like a hack and I don’t want to do this.

Anyone can help out?

Hello,
Use a game instance to save and load infos when player leave a map and goes to a new one :https://docs.unrealengine.com/latest/INT/Gameplay/SaveGame/Blueprints/index.html

Don’t forget to set your custom GameInstance as default in the project settings under Maps & Modes.