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

#1 2009-06-30 18:19:35

-db-
Scratcher
Registered: 2009-06-04
Posts: 100+

Basic Guide To Programming With Scratch

Hello, I made a guide for scratch members that need help with the scratch program. It is a basic guide for programming in scratch which explains each block and what it does. If I missed anything, let me know.
Lets start with the Motion blocks:

Move _ steps: This block will tell the sprite to move a certain distance in the direction it is pointing.

Turn -> _ degrees: This block will tell the sprite to rotate clockwise a certain number of degrees. The sprite will not change location, but it will change the direction it is pointing.

Turn <- _ degrees: This block is almost the same as the previous one, except it will rotate the sprite counterclockwise.

Point in direction _ : This block will tell the sprite to snap right to a specific direction. It will point in the exact direction that you put in.

Point towards _ : This block will tell the sprite to point towards another sprite or the mouse pointer. The location of the sprite will not change, but the direction it is facing will change.

Paddle2See wrote:

When you change a sprite's direction you may - or may not - see any actual change in the way the sprite looks on the screen.  It depends on which rotation mode you select with the little buttons up by the picture of the sprite by the top of the center section.  You can select from "don't rotate" , "only face left-right", or "can rotate".  But regardless of how the costume changes with the direction, the sprite will still move in the direction you set when you use the MOVE block.

Go to x: _ y: _ : This block will tell the sprite to move to a certain location on the screen. The sprite will not take any time to travel to the location.

Go to _ : This block will tell the sprite to go to a certain object on the screen. The object can be another sprite or the mouse pointer.

Glide _ secs to x: _ y: _ : This block will tell the sprite to go to a certain location on the screen, but it will take a certain time to travel to that location unlike the Go to blocks.

Change x by _ : This block will tell the sprite to change the x coordinate. This will cause the sprite to move left or right.

Set x to _ : This block will tell the sprite to go to a specific x coordinate. This will cause the sprite to move horizontally.

Change y by _ : This block will tell the sprite to change the y coordinate. This will cause the sprite to move up or down.

Set y to _ : This block will tell the sprite to go to a specific y coordinate. This will cause the sprite to move vertically.

If on edge, bounce: This block is pretty self-explanatory. If the sprite hits the edge of the screen, it will reflect off the edge on the same angle that it approached the edge.

x position: This block is used like a variable which will be covered in the variables section. You can use this block with the numbers or sensing blocks to change the horizontal location of the sprite

y position: This block is used like a variable which will be covered in the variables section. You can use this block with the numbers or sensing blocks to change the vertical location of the sprite.

direction: This block is used like a variable which will be covered in the variables section. You can use this block with the numbers or sensing blocks to change the direction the sprite is pointing.

In Scratch 1.4, you are able to use the Lego WeDo robotics kit in the scratch projects. To get the blocks to program with the kit, look towards the top of the screen where it says "Edit." Click on that, then look at the pull down menu. At the bottom of the menu it will say "Show Motor Blocks." Click on that to add the five motor blocks to use with the robotics kit. You will find these blocks in the Motion section down below all the other blocks.

Motor on for _ secs: This block will tell the motor to turn on for a certain number of seconds.

Motor on: This block will turn the motor on until the next block turns it off

Motor off: This block will turn the motor off after it is on.

Motor power _ : This block will set the power of the motor to a certain number. If the motor isn't already on, this will also turn the motor on.

Motor direction _ : This block will tell the motor to rotate clockwise (this way) or counterclockwise (that way). The reverse selection will make the motor rotate opposite of the way it was turning.

Now for the blocks in the Control section:
                               
When flag clicked: This block is probably one of the most frequently used blocks in Scratch. It will start most scripts and signal the blocks attached below it to start when the green flag is clicked.

When _ key pressed: This block will allow you to press a key from the large selection to cause the blocks attached below it to start.

When sprite clicked: This block will allow you to click on the sprite that the script is on, and the blocks are attached below it will start.

wait _ secs: This block will allow the script to wait for a certain number of seconds before it continues.

forever: This block will make any block(s) inside of it repeat forever until the stop button is pressed. The script inside the area will keep repeating over and over again.

Repeat _ : This block is similar to the forever block, but the script inside will only repeat for a certain number of times, and not repeat forever.

Because this guide is very labor intensive and time consuming, and I don’t have lots of spare time. I will try to update the topic with each section at a time. I have updated the guide with half of the Control section.

Last edited by -db- (2009-07-05 20:54:39)


http://i31.tinypic.com/2n8ofg4.jpg

Offline

 

#2 2009-07-01 04:57:45

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Basic Guide To Programming With Scratch

Cool guide!  You might want to point out that when you change a sprite's direction you may - or may not - see any actual change in the way the sprite looks on the screen.  It depends on which rotation mode you select with the little buttons up by the picture of the sprite by the top of the center section.  You can select from "don't rotate" , "only face left-right", or "can rotate".  But regardless of how the costume changes with the direction, the sprite will still move in the direction you set when you use the MOVE block.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2009-07-01 05:06:11

onedudeuk
Scratcher
Registered: 2009-01-11
Posts: 100+

Re: Basic Guide To Programming With Scratch

Great! Are you going to add to it, and update it with Scratch 1.4 scripts


http://i.imgur.com/1FaX3.gif
http://i.imgur.com/yu0s1.gif

Offline

 

#4 2009-07-01 17:43:28

-db-
Scratcher
Registered: 2009-06-04
Posts: 100+

Re: Basic Guide To Programming With Scratch

onedudeuk wrote:

Great! Are you going to add to it, and update it with Scratch 1.4 scripts

if there are any new blocks in 1.4 i will edit the guide and add the new blocks.


http://i31.tinypic.com/2n8ofg4.jpg

Offline

 

#5 2009-07-04 21:33:46

-db-
Scratcher
Registered: 2009-06-04
Posts: 100+

Re: Basic Guide To Programming With Scratch

new: edited to include scratch 1.4 motor blocks in the motion section
and half of the control section

Last edited by -db- (2009-07-05 20:55:16)


http://i31.tinypic.com/2n8ofg4.jpg

Offline

 

Board footer