How would I make it so that when the player starts the game they get asked for a name and how would I make that name get used every time the player gets adressed?
Hello, this is pretty simple to do and can be completed within a few steps.
1.Firstly create a new varibles titled “playerName”
2.Set the variable to an “ask for string” Input found in the purple game drawer. Make sure to get “ask for string” and not “ask for number”
3.You are pretty much done! You can call upon the variable in any text compatible format.
If you need an example, I made one —> https://arcade.makecode.com/S88183-50709-65077-13647
Click on the “Edit code” button in the top left corner to see the code. Ask me if you have any question about the example or need and further guidance.
Btw if you want the data to save use the settings extension instead of a variable
thanks, man/miss (sorry, don’t want to assume gender since everyone here is so nice) i’ll tell you if I have any issues or if you want to help me with the game you can always email me at vincentturdhead2010@gmail.com (it’s an old email and I never bothered changing it)
welp… the project just got corrupted so ain’t that just grand
can you tell me how to use it?
Sure, once you have stored the name in a variable like this:
![]()
You can call upon that variable anytime you want to use it.
Ensure you are only using inserting the variable in places where a “*string” goes, otherwise an error will be caused. This also works for numbers! Instead of using ask for string use ask for number. When using a number ensure you are only putting it in places where a number goes, if you want a string that says the number than you can use the “convert to text block” in the text drawer.
*String is the word for a variable that stores text
