[Solved] Transfer data to other scenes

good afternoon guys, I’m Brazilian and I’m using Google translator, I’m developing a 2d platform game, the game takes place in the character’s house in which every room in the house and a scene would like to know how I can pass the player’s data: life, hunger , headquarter and the player itself without having to put this data in each scene ?

boa tarde galera sou brasileiro e estou usando o Google tradutor, estou desenvolvendo um jogo 2d plataforma ,o jogo se oassa na casa do personagem no qual cada comodo da casa e uma cena gostaria de saber como posso passar os dados do player : vida, fome ,sede e o proprio player sem ter que ficar colocando em cada cena esses dados ?

Global variables and Storage for Local storage in order to save data even if the player exit the game.
Look at the examples save & load or just Google it.
Plus there is a lot of tutorials in Portuguese

1 Like

I’ve seen this but it’s not what I need, I need you to save the character so you don’t have to create him in every scene

so load in other scene.
You have two options:

  1. use global variables (just showing till you close game)
  2. use write/read (saves data)

with second option you write your character data, in other scene you load same data.

1 Like

I get it, but that way I have to create the character in each scene.

@Karolis’s option 1, global variables, is the way to go and fits your requirements.

A opção 1 de @Karolis, variáveis ​​globais, é o caminho a seguir e se adapta às suas necessidades.

(Obrigado, tradutor do Google :slight_smile: )

1 Like

the external layout method is not suitable for this?

you can close the topic i’ve fixed it , thanks everyone

Yes, that would do it too.