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 clickedWhat 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 [] stepsNow, 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.
Point towards []Now, In the little box click on it and select mouse-pointer.
ForeverWhat 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] stepsNow, click the green flag and move the mouse around. Notice that the sprite is constantly pointing toward the mouse and moving.
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.
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.
When gf clicked Forever if <> HideNow, 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]?> HideNow, 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.
showBy now I think you'd know how to work it. Now, remember, trying things out is the best.
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.
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:
Go to []Now, click on the box and click on "sprite 2"
Stop allWhat 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 scriptAgain, this only stops the script it is in.
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
Bumpity bump
Offline
Wow. How long did you spend writing that?
Offline
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 scriptsAWESOME JOB!
Fixed
Offline
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 scriptsAWESOME JOB!Fixed
Thanks!
Offline
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
Bump
Offline