Discuss Scratch

Creator1972
Scratcher
26 posts

Programming Login/Logout

I am making a game in which users can login and logout. How can you program it? Also, when you logout, how do you save any changes made for one user?

Please help!

Creator1972

jonathanmm305
Scratcher
48 posts

Programming Login/Logout

Do you have cloud variables yet because it is impossible to do it without those.
show variable [Cloud Variable 1 v]
BF10
Scratcher
500+ posts

Programming Login/Logout

jonathanmm305 wrote:

Do you have cloud variables yet because it is impossible to do it without those.
show variable [Cloud Variable 1 v]
He's a Scratcher so he does.

Last edited by BF10 (Sept. 11, 2015 22:41:27)


Finally, a Saus(a) kumquat ate my old signature. Am I the only one happy about this?
deck26
Scratcher
1000+ posts

Programming Login/Logout

If you want any sort of data associated with particular users you're talking about cloud lists and encoding usernames to convert to strings of digits. There are lots of cloud list projects and this page http://wiki.scratch.mit.edu/wiki/Global_High_Scores is a useful starting point.
temmie_1019
Scratcher
1 post

Programming Login/Logout

hm idk yet

Last edited by temmie_1019 (May 12, 2019 21:21:54)

AARstudios
Scratcher
10 posts

Programming Login/Logout

You need to use cloud variables and 2 lists. One list can contain the usernames, and another can contain the passcodes. The passcodes are also stored in a cloud variable.

The username needs to match the passcode. The program will ask you what your username is, and then your passcode. If they match, you can broadcast a message like, “start game” or something like that. To have a person create an account, you can make a button that the person can tap, and then ask something like, “what would you like your username to be?” and then, “what would you like your passcode to be?” and then set the username to one list and the passcode to another, and also set the passcode to a cloud variable.
Note: cloud variables can only contain numbers.




By the way I got this info from a tutorial on YouTube, check it out here: https://www.youtube.com/watch?v=OTItaRg-f_c



AARstudios

when green flag clicked
set [ Scratch] to ((cool) * (10000000))
forever
Imagine, Program, Share
end
Kraken_Games
Scratcher
100+ posts

Programming Login/Logout

temmie_1019 wrote:

hm idk yet

AARstudios wrote:

You need to use cloud variables and 2 lists. One list can contain the usernames, and another can contain the passcodes. The passcodes are also stored in a cloud variable.

The username needs to match the passcode. The program will ask you what your username is, and then your passcode. If they match, you can broadcast a message like, “start game” or something like that. To have a person create an account, you can make a button that the person can tap, and then ask something like, “what would you like your username to be?” and then, “what would you like your passcode to be?” and then set the username to one list and the passcode to another, and also set the passcode to a cloud variable.
Note: cloud variables can only contain numbers.




By the way I got this info from a tutorial on YouTube, check it out here: https://www.youtube.com/watch?v=OTItaRg-f_c



Please don't necropost

KRAKEN_GAMES


I live in the depths


.)

Powered by DjangoBB