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

#1 2012-10-23 09:55:46

RoyalToHisLoyal
Scratcher
Registered: 2012-06-15
Posts: 22

I need a few tips on the block "Ask (anything) then wait"

I'm working on an OS, so far i got the login menu working, but when i make the screen ask "Whats the password" i type it in, then when i try to make the "Ask (anything) and wait" block, i can't seem to do it, help will be appreciated  smile , Btw, you'll also get to be in the project notes for helping  big_smile , thanks in advance  smile .













~RoyalToHisLoyal~

Offline

 

#2 2012-10-23 10:17:26

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: I need a few tips on the block "Ask (anything) then wait"

What exactly happens when you use the ask [] and wait block ?


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

#3 2012-10-23 12:22:15

elfin8er
Scratcher
Registered: 2012-01-15
Posts: 1000+

Re: I need a few tips on the block "Ask (anything) then wait"

You should just be able to do something like

set [password v] to [password] //insert a password here.
ask [password] and wait
Then to check if the password is correct, do something like

if < (answer) = [password v] >
   Rest of Code Here!
If you want, you can also let the user change their password.
ask [Please enter a password.] and wait
set [password v] to (answer)
You can even have the user verify their password like this:
ask [Please enter a password.] and wait
set [password check v] to (answer)
ask [Please confirm your password.] and wait
if < (answer) = [ password check v ] >
set [password v] to (answer)
say [Password Changed] for (3) secs
end

Last edited by elfin8er (2012-10-23 12:39:53)


http://i1340.photobucket.com/albums/o723/stevetheipad/goldlittlesig.png

Offline

 

Board footer