Today i'm going to show you how to create a username system for your game!
Tutorial Difficulty:Beginner-Anyone can do it
So first of all you want to create a textbox or something where the player can put in the username of choice (if you know how to add some styling to the text box you can do it)
#Now create a global variable and call it something you can remember for later!
Set the variable settings to the following:
Name:(Choose your own)
Inital Value:(Leave Blank)
Description:Used for username storage#
Now on the same layout as the textbox or whatever you used for input of the players username and on the event sheet of that layout do the following:
Create Condition\Textbox\On text changed
Create Action\System\Set value\Select the variable you made earlier\In the value box put TextBox.Text\
(Change TextBox to whatever you used for input)
Step 4:To use the username in text do the following:
Create Condition\System\On Start Of Layout\Set text\"Welcome "& SC_Account &" To the Space Connect screen"\
(Change SC_Account to the variable name you used)
Of course you can do so much more than just set the text to display the username but that's for another tutorial.Anyways if you found this helpful then please share the post with the community and here is a few screenshots from my game to show you what the event sheet looks like and other stuff if you found this tutorial useful share it with other fellow construct 2 members and peace out!