Quote:
Originally Posted by Dj Tech42
Can you use the author string to make profiles? (separate variables for every user playing the game)
|
I would prefer you didn't.
The author variable is your (the creators) name/nickname, the game title is the title of the game.
Any other way and saves could get mixed up.
If you want to create game profiles for different users then you can. When you use the
save_var method you get a
name parameter. This can have any value, it doesn't have to relate to the
var parameter at all, but for the sake of keeping it simple I suggest you do make it relate somehow.
Because it can have any value, you can request a username from the user or work out some other way of identifying each user and getting a unique string out of it for their profile. You can then simply join the username and the string you would have set the
name parameter to. I suggest joining them with a "." in the middle.
eg. If I entered my username as "Arty-fishL" and the name being used to identify the variable being saved was "score" then the value to use as the
name parameter for the
save_var method would be:
"Arty-fishL.score"
Or if my username was "Dj Tech" it would be:
"Dj Tech.score"
Does that make sense?
Take a look at my attached example that uses the eg
Enter a username
Press green to increase your score
Red to reset it
Restart the world and enter the same name, your score will load
Try it with different names
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬