How do I insert multiple variable?

InsertYourName

Hello~ I’m new here and currently I’m creating a mini game that require multiple players to insert their name before the game started. In the scene to insert the players name will be only one Text Input and a submit button.

So my first question is, how am I suppose to store more than one names I have typed in the Text Input and make it saved as a different variable after I click the submit button? For example, I have 5 children wants to play the game , First is A student, second is B student and C, D, E. What am I going to do is, when A student fill in his name in the Text Input and click the submit button, then the name ‘A’ will be stored in a new variable for A student. After that for the B student, he needs to type his name ‘B’ in the same Text Input and click the same submit button to save his name ‘B’ as a new variable, so on for C, D, and E.

Second question, if A, B, C, D, and E has been stored in their respective variable, how to display all of the name?

I know there’s a extension called Array Tools, is this extension able to solve my problem? If yes, how? I’ve play around with Array Tools but still couldn’t understand how it works.

P/S: The players are not restricted to only 5, it can be more than or less than 5, depend on how many name u inserted in the Text Input and submitting them.

0-welcome
1-you can make it so every time the enter button is pressed (return) the game will store the data to var and clear the text like this:


2- you can put a text object and make it display the vars like this:

I hope it solves your problem good luck with your game it sounds fun.