This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-06-16 22:19:13

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

UKernel Login System

I'm building an OS off of the U-Kernel, er, kernel, and I am somewhat confused on how to make a logon system. The maker of the U-kernel hasn't made a demonstration OS, and he didn't provide much instructions on making all the systems work. Being relatively new to Scratch, I was at first stumped, but I figured out how to get the first login. It went like this:

when I receive [create admin account]

Offline

 

#2 2012-06-16 22:47:43

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

Sorry, I accidentally pressed "Submit".

when I receive [create admin account]
ask [Enter Username:] and wait
replace item (1) of [Usernames] with (answer)
ask [Enter Password:] and wait
replace item (1) of [Passwords] with (answer)  
broadcast [adminacccreated]
Also, I need help with a another aspect of the logon system.

How do I let the system check if a username is already in use? And if a username is in use, can I restart the login system?

At first, I used a cumbersome method that involved a lot of "if" statements, and it worked, but it prevented the rest of the logon system from working. I need a more usable method that does not prevent the rest of the system from working.

Offline

 

#3 2012-06-16 23:13:08

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

Also, I need  to know how I can make it so that the system recognizes when it is your first time running the OS.

Offline

 

#4 2012-06-17 00:02:50

armor2008
Scratcher
Registered: 2011-05-18
Posts: 25

Re: UKernel Login System

I wouldn'tuse the replace item block. Have a counter go through and check if the usernameis availabe. If its not, add it to the list. Variables in Scratch can be set by clicking on them. Ste a variable caleed "firsttime?" to true. If they login, set it to false. If the variable = false, they are new. Hope this helped.

Offline

 

#5 2012-06-17 02:44:42

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

A Counter? What's that?

Offline

 

#6 2012-06-17 02:49:36

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

Also, this is for the initial account, so I can use the "Replace Item" block.
However, I will take your advice and use that for the other logins.

Offline

 

#7 2012-06-17 04:08:36

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: UKernel Login System

Lists is a definite must when creating an account creation/logon system of this sort. I've actually developed my own engine for it. I'm pretty sure it works the way you're looking for. You can take a look at it, download it, and use it in future creations of your own if you'd like. Here's the link:

http://scratch.mit.edu/projects/Zparx/2616866

Tell me what you think! Also, if you find any bugs, please report them to me? Happy scratching (:


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#8 2012-06-17 19:50:25

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

The U-Kernel comes with the lists required for the logon system. The problem I'm having is I don't know exactly what to do with them. But that is a good logon engine you have there.

Offline

 

#9 2012-06-17 19:55:41

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: UKernel Login System

ZondaE85 wrote:

The U-Kernel comes with the lists required for the logon system. The problem I'm having is I don't know exactly what to do with them. But that is a good logon engine you have there.

Oh, my apologies! Good luck finding the answers you need (:


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#10 2012-06-17 20:02:03

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

Thanks. I may recommend that engine to other OS makers.

Offline

 

#11 2012-06-17 20:23:14

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: UKernel Login System

ZondaE85 wrote:

Thanks. I may recommend that engine to other OS makers.

That would be awesome! I'd like a lot of views and feedback (:

the only flaw in my engine is that it's not case sensitive, but I could easily implement that feature (:


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#12 2012-06-20 13:39:33

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

Bump

Offline

 

#13 2012-06-20 13:44:15

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

And thanks for all the advice!

Offline

 

#14 2012-06-24 02:39:56

ZondaE85
New Scratcher
Registered: 2012-05-31
Posts: 13

Re: UKernel Login System

This Post Is Closed. I No Longer Need Advice.

Offline

 

Board footer