Alice Community  

Go Back   Alice Community > Alice 2 > Share Objects

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Senior Member
arty-fishL's Avatar
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 02-11-2012, 03:23 PM

Originally Posted by Dj Tech42 View Post
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:
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
Attached Files
File Type: a2w SaveTool User Profiles Example.a2w (481.3 KB, 7 views)


I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬

Last edited by arty-fishL; 02-11-2012 at 03:29 PM.
Reply With Quote

file, load, save, variable, write

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.