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

#1 2012-03-16 10:28:49

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Quick tutorial/ info for New Scratchers

Welcome to scratch! Scrath is a programming language for people of all ages. Anyone can learn it.
    Here on scratch we make projects, share them on this website, and discuss many things. Have you ever wanted to make a video game? Well, now you can. You use blocks, sprites, scripts, and backgrounds to create projects. Now, are you wondering, what do I do? Well, I'm going to help you with that. Now, open up scratch and follow this little guide. Now, so you notice there is an orange cat on the screen? It's the default sprite. Sprites are basically characters.
     How do you get a new sprite? Under the stage, the large white box in the top right corner, you see "paint new sprite". That us where you can draw your own sprite. Also, you see "import sprite" which means you can import a sprite from a layout of many types of sprites. Now, as you look on the screen, you're probably wondering what everything does? Well, in a selected sprite, which you select by clicking on under the stage, you see costumes, scripts, an sounds.
    Costumes-sprites an have multiple costumes, and you can switch costumes in projects.
    Scripts- this is where you insert all of your blocks and scripts. This is where you program the sprite to do actions.
     Sounds- this just holds the collection of sounds that you either record or import. In the scripts you can program it to play these sounds.

     How to play a project
After all your scripts are done, you play a project by clicking the green flag in the top right corner. To stop you click the adjacent (next to it) stop sign. Now, to make scripts, you need to connect blocks. Way in the left are the blocks. You combine them in order to program your game. Now, drag this block, which is under control, into your scripts:

When gf clicked
What this does is starts the scripts connected to it when the green flag is clicked. Now, see that hump at the bottom of it? That is where you connect other scripts. Now, go to motion and drag the "move steps" block ad connect it. So it should look like this:
When gf clicked
Move [] steps
Now, in the tiny box in your script, type in the number 10. Then, click on the green flag. See? Your sprite moved 10 steps. 10 steps represents 10 pixels, little dots of light that make up your screen.
     Now, if you want to learn what other blocks do, right-click on them and select help. It will tell you what they're for.
     Now let's talk about backgrounds. More nearer lower half in the middle, click on background. Currently, it's plain white, but if you then select "backgrounds" which is in place of costumes, which are only for sprites, you can paint a new background or import one. You can also connect your camera and take a photo, but let's not get too advance. You can have multiple backgrounds.
     Playing around wih things is the best way to learn. If you ever want to test out a block, just click on it. Also, remember to click on the help for blocks. Hope this was helpful! If you want to learn more, keep reading. And whenever I introduce a new script to you, delete the old ones by right-clicking and selecting delete or dragging the script way to the left.

Now, insert this block into your sprite's scripts, and it's under motion:
Point towards []
Now, In the little box click on it and select mouse-pointer.
Then, click on the block and notice your sprite points toward the mouse. Now, it's time to learn another very important block, and it's in control:
Forever
What this does is it repeat whatever you put in it forever. So now insert some of the blocks i taught you. Make it like this:
When gf clicked
Forever 
Point towards [mouse pointer v]
Move [4] steps
Now, click the green flag and move the mouse around. Notice that the sprite is constantly pointing toward the mouse and moving.
    Now, if you notice the sprite moves in the direction it's facing. What if you want it facing, perhaps up, but moving left? You use this script, and you may need to search some for these blocks:
When gf clicked
Point in direction [180]
Forever
Change x by [-1]
The stage is like a coordinate plane. X refers to left and right and y refer to up and down. Oh, and before I say anything else, sometimes the shape or color of the blocks on here are different than thy are in scratch. Anyway, if you change x by a poilsitive number, the sprite moves that many pixels to the right. A negative giea to the left. For y, positive numbers go up, negative go down.
     Now, notice the point in direction block is not in the forever loop. That way it only does it once. Now click the green flag and watch the sprite face up but move left. Also, if you click on the sprite on the stage you can drag it anywhere on the stage.
     Time to learn another important block:
Broadcast []
Broadcasting is extremely useful, and it's in control by the way. What it does is sends a message. When a message I sent others immediately receive it. When they receive it thy can then perform their action. Now, paint a new sprite or import one, I don't care which. When your done go to its scripts and drag this block into the scripts:
when I receive []
Now go back to sprite 1, and you select the sprites underneath the stage. Make a script like this:
When gf clicked
Wait (2) seconds
Move [10] steps
Broadcast [bounce v]
I know I didn't introduce the wait block to you, but you could probably guess what it does. To broadcast "bounce" you click on the box and select new, and then you type it in. Now go back to sprite 2. Make a script like this:
When I receive [bounce v]
Change y by [20]
Wait (0.2) seconds
Change y by [-20]
Now, click the green flag an see what happens. Notice that when "bounce" is broadcasted it is also received by the other sprite. Since your changing y in the script the sprite moves up and down instead of right and left.
       Time to learn sensing(and ps:when I introduce a new script delete the old ones. Right click and delete or drag it way to the left).
Make a script in sprite 1 that looks like this:
When gf clicked
Forever if <>
Hide
Now, let me explain, and I'd you can't find some of the blocks just keep searching. What hide does I makes your sprite disappear. Now, grab this block which is under sensing:
<touching []?>
Now, click on the box and select sprite 2. Then drag the block into the script do it now looks like this:
When gf clicked
Forever if <touching [sprite 2 v]?>
Hide
Now, click on the green flag and drag sprite 1 over to sprite 2. Right when they touch sprite 1 hides. If you analyze the script you can see the connection.
        Now, how do you get sprite 1 to show again? With the show block, which is in looks:
show
By now I think you'd know how to work it. Now, remember, trying things out is the best.

Now, let's learn a very useful block, which is under motion: ps: these next 3 blocks are ACTUALLY BLUE.
go to x [] y []
Remember before where I mentioned that the stage is like a coordinate plane? Well now it comes in handy. If you look at the bottom right corner OF THE STAGE, you will see an "x" with a number and a "y" with a number. These are the current coordinates your mouse-pointer is at. Now, say you want the sprite going to the middle of the stage. You would put this in the boxes:
go to x [0] y [0]
Now click on the block and your sprite will go to the very middle of the stage. If you want a specific location then you move your mouse to that spot, look at the coordinates on the bottom corner o the stage, and type them in.
   The glide block is the same thing except it glides there for the amount of time you choose. Here is what it looks like, and it's also in motion:
glide [] seconds to x [] y []
Now, move your sprite away from the middle of the stage by clicking and dragging it. Then, type in 0 for each coordinate again. Then, in the first box put the number 3 in. So it should look like this:
[scrathblocks]
glide [3] seconds to x [0] y [0]
Go to []
Now, click on the box and click on "sprite 2"
Then click on the block and sprite 1 will go to sprite 2.

Let's now learn a very important block, and it's under control:
Stop all
What this does is stops EVERYTHING of every sprite. Its very useful for ending a game. Also, this next block, which is under control, stops only the script it is in:
Stop script
Again, this only stops the script it is in.

Next, go to the "variables" section. You may wonder what a aeiable is. Well, first, create a new variable, and you should be able to figure out how. Variables are good for keeping score. So say your making a basketball game. A script like this would work:
When I receive [shot scored v]
Change [score] by [2]
With this the score will change by 2 when a field goal is scored. Hope this was helpful, and I will keep updating this.

Last edited by turkey3 (2012-03-18 17:44:00)

Offline

 

#2 2012-03-17 12:50:45

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Quick tutorial/ info for New Scratchers

Bumpity bump

Offline

 

#3 2012-03-17 12:57:05

Haiming
Scratcher
Registered: 2011-08-20
Posts: 1000+

Re: Quick tutorial/ info for New Scratchers

Wow. How long did you spend writing that?  lol

Offline

 

#4 2012-03-17 12:57:23

D-LUX
Scratcher
Registered: 2012-03-16
Posts: 63

Re: Quick tutorial/ info for New Scratchers

[scratchblocks]
when gf clicked
Say [awesome guide!] for (infinite) secs
think [Wow, this should be stickied!] for (80 Million) secs
Go to [epic post v]
stop all scripts

AWESOME JOB!

Offline

 

#5 2012-03-17 13:01:02

D-LUX
Scratcher
Registered: 2012-03-16
Posts: 63

Re: Quick tutorial/ info for New Scratchers

when gf clicked
Say [awesome guide!] for (infinite) secs
think [Wow, this should be stickied!] for (80 Million) secs
Go to [epic post v]
stop all scripts
AWESOME JOB!

^want to be a scratcher. BAD.

Offline

 

#6 2012-03-17 13:02:16

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Quick tutorial/ info for New Scratchers

D-LUX wrote:

when gf clicked
Say [awesome guide!] for (infinite) secs
think [Wow, this should be stickied!] for (80 Million) secs
Go to [epic post v]
stop all scripts
AWESOME JOB!

Fixed

Offline

 

#7 2012-03-17 13:04:41

D-LUX
Scratcher
Registered: 2012-03-16
Posts: 63

Re: Quick tutorial/ info for New Scratchers

turkey3 wrote:

D-LUX wrote:

when gf clicked
Say [awesome guide!] for (infinite) secs
think [Wow, this should be stickied!] for (80 Million) secs
Go to [epic post v]
stop all scripts
AWESOME JOB!

Fixed

Thanks!  smile

Offline

 

#8 2012-03-17 13:23:04

Geekish
Scratcher
Registered: 2012-03-10
Posts: 100+

Re: Quick tutorial/ info for New Scratchers

Nextime could you do another tutorial but the next step for new scratchers please?


http://dl.dropbox.com/u/33551365/yesssss.png

Offline

 

#9 2012-03-17 22:34:29

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Quick tutorial/ info for New Scratchers

For all you who don't know (why would you) this took me line 2.5 hours. And I'm sorry for when I don't get the right color for the scratchblocks, I haven't quite mastered it.

Offline

 

#10 2012-03-19 19:00:27

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Quick tutorial/ info for New Scratchers

Bump

Offline

 

Board footer