How to keep an input text in all scenes?

I created 4 input texts for 4 players, Each of them must write his name in the first scene, I want all of the input texts to be loaded in the next scene with the player’s name which they wrote.
How can I do that?

Hi, you need to store the names in global variables. Global variables [GDevelop wiki]

But the game will be played for many times with a lot of students, Names will be changed every time.

Okay, what bothers you about that? You have 4 fields and you need 4 global variables which you can reassign when new players enter their names before they start a new game.

I want to publish it as an exe game, So I can’t reassign them every time.

Yes, you can and that’s how all software works that asks for some input. The variable is just like a container that keeps a value or a string (like your player names). If you want to keep this value across multiple scenes you need to set them as global variables. By doing so you can display the names of your players until the game ends and new names are being entered.

1 Like