Hello, and welcome to the Scratch Code Tutorial. First of all, you need to have it open. Download it or you will not be able to complete the tutorial. Press the green flag and lets begin.
Okay, you will see a list, and the Scratch cat on the screen in front of you. The cat is at 0 x 0 y. First of all, lets make him move. Type this in:
move.10
and press enter. Remember to press enter between every line. Now, to run through your script, type in 'go' and press enter. What will happen now is your command will be transferred to a second, invisible list, and processed. Assuming you have typed in the correct thing, the cat will move 10 steps.
Now, lets add a second line of script. Type in
move.-20
Now run through the scripts and the cat should end up where he started. Then type in 'clear' an press enter.
Now lets look at effects. Type in this, remember to press enter between each line:
colour.10 whirl.10 fisheye.10
Now run through your scripts. Since you have downloaded it, you can now edit the script. If you are in presentation view, leave it. Now click on the line of the script that says 'colour.10', and change the 10 to a 20. Now do this for all the lines and run the script through again.
Now you've learnt how to edit your script and do some effects. These are the other effects:
bright.[value] Brightness pixel.[value] Pixelate mosaic.[value] Mosaic ghost.[value] Ghost
Now add another line to the program, type in:
clear graphic effects
Run through the scripts. I'm sure you can guess what will happen.
Right, now lets play around with the pen. Clear it then type this in:
pen down pen.50 move.10 point.0 move.10 pen up point.90 move.10 pen down pensize.20 move.10 clear pen stamp move.10 stamp move.10 clear pen
Now run through your scripts.
We've learnt a few new commands.
pen.[value] Sets pen colour pensize.[value] Sets pen size pen down - start using the pen pen up - stop using the pen stamp - stamps the Scratch cat clear pen - clears the pen on the screen point.[value] Point in a direction
Now, lets have a look at some new bits of code. Type in clear and then type this in:
x.20 y.20 ask.What's your name? say.That's a nice name think.That's a rubbish name size.80 size.60 size.40 size.20 size.0 size.100 hide wait.1 show x.0 y.0
That's a script full of completely new commands. It's obvious what they do, but I'll explain anyway:
x.[value] Set x position y.[value] Set y position ask.[question] Use Scratch's ask function say.[something] Say something think.[something] Think something size.[value] Set size wait.[value] Wait a certain amount of seconds hide - hide show - show
Now, lets just do one more thing and then you're done, clear it first:
move.10 next costume move.10 next costume move.10 next costume move.10 next costume
Run through the script.
Right, we've learnt all the commands in Scratch Code. Now just play around with them.
Check back here for updates on Scratch Code, and most importantly, Scratch Off, no, sorry, Scratch On (or off if you want to)!
Last edited by WeirdF (2009-10-29 04:07:57)

Offline