(Redirected from Block (2.0))

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
This article or section documents an outdated version of Scratch (version 2.0). For this article in the current version, see Blocks (3.0). For this article in Scratch 1.4, see Blocks (1.4).

Blocks were puzzle-piece shapes that were used to create code in Scratch. The blocks connected to each other vertically similar to a jigsaw puzzle, where each data type (hat, stack, reporter, boolean, or cap) had its own shape and a specially shaped slot for it to be inserted into, which prevented syntax errors. Series of connected blocks were called scripts.

There were twelve categories of blocks: motion, looks, sound, pen, variables, list, events, control, sensing, operators, more blocks, PicoBoard, and LEGO Education WeDo 2.0 (although there were some other categories and blocks in some Scratch modifications). Only ten of these were shown in the Block Palette.

In total, there were eleven Hat Blocks, five C Blocks, thirty-seven Reporter Blocks, thirteen Boolean Blocks, two Cap Blocks and seventy-seven Stack Blocks.

Block Shapes

There were six different block shapes: Hat, Stack, Boolean, Reporter, C and Cap.

Hat blocks

The shape of a Hat block in 2.0.
Main article: Hat Block

Hat blocks were the blocks that started every script. They were shaped with a rounded top and a bump at the bottom — this was so blocks could only be placed below them. There were 11 Hat blocks in the Scratch editor, six of which were in the Events category, one in the control category, and one in the category more blocks (if any custom blocks had been created).

Stack blocks

The shape of a Stack block.
Main article: Stack Block

Stack blocks were the blocks that performed the main commands. They were shaped with a notch at the top and a bump on the bottom — this was so blocks could be placed above and below them. There were 77 Stack blocks, making it the most common block shape.

Boolean blocks

The shape of a Boolean block.
Main article: Boolean Block

Boolean blocks were the conditions — they were either true or false. With a hexagonal shape, there were 13 of these blocks.

Reporter blocks

The shape of a Reporter block.
Main article: Reporter Block

Reporter blocks were the values. Reporter blocks could hold numbers and strings. Shaped with rounded edges, there were 37 of these blocks — not counting the theoretically infinite amount of Reporter blocks that can be made for each variable and list.

C blocks

The shape of one of the C blocks.
Main article: C Block

C blocks were blocks that take the shape of a "C". Also known as "Wrap blocks"[citation needed], these blocks looped the blocks within the Cs or checked if a condition is true. There were five C blocks, and they could be found in the Control category. C blocks could be bumped at the bottom, or capped.

Cap blocks

The shape of a Cap block.
Main article: Cap Block

Cap blocks were the blocks that ended scripts. They were shaped with a notch at the top and a flat bottom — this was so no blocks could be placed below them. There were two Cap blocks which can both be found in the Control category.

List of Blocks

There were 145 blocks in Scratch 2.0.

Motion blocks

Main article: Motion Blocks


Motion blocks were the blocks that controlled a sprite's movement. There were 17 motion blocks in Scratch 2.0.

Scratch 2.0 had the following fourteen motion stack blocks:

Scratch 2.0 had the following three motion reporter blocks:

Looks blocks

Main article: Looks Blocks


Looks blocks were the blocks that control a sprite's look. There were 23 looks blocks in Scratch 2.0. Three of the 19 sprite looks blocks have a counterpart for the Stage.

Scratch 2.0 had the following sixteen looks stack blocks:

Scratch 2.0 had the following three Looks Reporter blocks:

Sound blocks

Main article: Sound Blocks


Sound blocks were the blocks that controlled sound and MIDI functions. There were 13 sound blocks in Scratch 2.0.

Scratch 2.0 had the following eleven sound stack blocks:

Scratch 2.0 had the following two sound reporter blocks:

Pen blocks

Main article: Pen Blocks


Pen blocks were the blocks that controlled the pen. There were 11 pen blocks in Scratch 2.0.

Scratch 2.0 had the following eleven pen stack blocks:

The Scratch Day pre-alpha of Scratch 2.0 had the following one new pen stack block:

  • Stamp Transparent () — Penned the sprite's image on the screen at the transparency of the amount in the block., which could be removed using clear. This was made obsolete by respecting graphic effects while stamping normally.

Data blocks

Variables blocks

Main article: Variables Blocks


Variables blocks were the blocks that held values and strings. There were 5 variables blocks in Scratch 2.0.

Scratch 2.0 had the following four variables stack blocks:

Scratch 2.0 had the following variables reporter block:

  • () — The variable's value.

List blocks

Main article: List Blocks


List blocks were the blocks that managed lists. They were stored in the Data category. There were 10 List blocks in Scratch 2.0.

Scratch 2.0 had the following six list stack blocks:

Scratch 2.0 had the following 3 list reporter blocks:

Scratch 2.0 had the following list boolean block:

  • () Contains () — The condition for checking if an item's content was the specified text.

Events blocks

Main article: Events Blocks


Events blocks were blocks that controlled events and the triggering of scripts. There were 8 events blocks in Scratch 2.0.

Scratch 2.0 had the following six events hat Blocks:

Scratch 2.0 had the following two events stack blocks:

  • Broadcast () — Sent a broadcast throughout the Scratch program, activating when I receive () blocks that were set to that broadcast.
  • Broadcast () and Wait — Like the Broadcast () block, but paused the script until all scripts activated by the broadcast were completed.

Control blocks

Main article: Control Blocks


Control blocks were the blocks that controlled scripts. There are 11 control blocks in Scratch 2.0.

Scratch 2.0 had the following one control hat block:

  • When I Start as a Clone (sprites only) — This hat block was triggered whenever a clone is created, and would only be run by that clone.

Scratch 2.0 had the following three control stack blocks:

Scratch 2.0 had the following five Control C blocks:

  • Repeat () — A loop that repeated the specified amount of times.
  • Forever — A loop that would never end.
  • If () Then — Checked the condition so that if the condition is true, the blocks inside it would activate.
  • If () Then, Else — Checked the condition so that if the condition is true, the blocks inside the first C would activate and if the condition is false, the blocks inside the second C would activate.
  • Repeat Until () — A loop that would stop once the condition is true.

Scratch 2.0 had the following two control cap blocks:

  • Stop () — Stopped the scripts chosen through the drop-down menu. Could also be a stack block when "other scripts in this sprite" is chosen.
  • Delete This Clone (sprites only) — Deleted a clone.

Sensing blocks

Main article: Sensing Blocks

Sensing blocks were the blocks that detected things. There were 20 sensing blocks in Scratch 2.0.

Scratch 2.0 had the following four sensing stack blocks:

Scratch 2.0 had the following five sensing boolean blocks:

  • Touching ()? — The condition for checking if the sprite was touching the mouse-pointer or another sprite.
  • Touching Color ()? — The condition for checking if the sprite was touching a specific color.
  • Color () is Touching ()? — The condition for checking if a color on the sprite was touching a specific color.
  • Key () Pressed? — The condition for checking if the specified key was being pressed.
  • Mouse Down? — The condition for checking if the mouse was down.

Scratch 2.0 had the following eleven Sensing Reporter blocks:

  • Distance to () — The distance from the sprite to the mouse-pointer or another sprite.
  • Answer — The most recent input with the Ask () And Wait block.
  • Mouse X — The mouse-pointer's X position.
  • Mouse Y — The mouse-pointer's Y position.
  • Loudness — How loud the noise was that the microphone was sensing.
  • Timer — How much time had passed since the Scratch program was opened or the timer reset.
  • Video () on () — The video motion or direction of video motion on an object.
  • () of () — The X position, Y position, direction, costume, size or volume of the Stage or a sprite.
  • Current () — The specified time unit selected.
  • Days Since 2000 — The number of days since 2000.
  • Username — The username of a user.

Operators blocks

Main article: Operators Blocks


Operators blocks were the blocks that performed math functions and string handling. There are 17 operators blocks in Scratch 2.0.

Scratch 2.0 had the following six operators boolean blocks:

  • () < () — The condition for checking if a value was less than the other.
  • () = () — The condition for checking if two values were equal.
  • () > () — The condition for checking if a value was greater than the other.
  • () and () — Joined two conditions.
  • () or () — Joined two conditions, but they functioned separately.
  • Not () — Made the condition checked if it is false, not true.

Scratch 2.0 had the following eleven operators reporter blocks:

  • () + () — The value of the addition.
  • () - () — The value of the subtraction.
  • () * () — The value of the multiplication.
  • () / () — The value of the division.
  • Pick Random () to () — Chose a random number between the two limits.
  • Join ()() — The two values concatenated with each other.
  • Letter () of () — The specified character of the value.
  • Length of () — The length of the value.
  • () Mod () — The remainder of the division.
  • Round () — Rounded the value to the nearest whole number.
  • () of () — The absolute value (abs), square root (sqrt), sine (sin), cosine (cos), tangent (tan), asine (asin), acosine (acos), atangent (atan), natural logarithm (ln), logarithm (log), exponential function (e^), or base 10 exponential function (10^) of a specified value.

Right-clicking some of the blocks would yield more choices of its type.

More blocks

Main article: More Blocks

More blocks were user-made custom blocks. There were 2 unique kinds of more blocks in Scratch 2.0. They are known as my blocks in Scratch 3.0.

Scratch 2.0 had the following More Modified Hat block:

Scratch 2.0 had the following More Stack block:

  • () — A custom block.

PicoBoard blocks

Main article: PicoBoard Blocks


PicoBoard blocks were used to control and sense data from the PicoBoard.

Scratch 2.0 had the 2 following PicoBoard hat blocks:

Scratch 2.0 had the following PicoBoard boolean block:

Scratch 2.0 had the following PicoBoard reporter block:

LEGO WeDo 1.0 blocks

Main article: LEGO WeDo 1.0 Extension

LEGO WeDo 1.0 blocks were used to connect the LEGO WeDo unit to Scratch. They are accessed via the Add an Extension button.

Scratch 2.0 had the following five LEGO WeDo Stack blocks:

Scratch 2.0 had the following two LEGO WeDo Hat blocks:

Scratch 2.0 had the following two LEGO WeDo Reporter blocks:

Scratch Block Plugin

Main article: Block Plugin


The Scratch Block Plugin allowed blocks and scripts to be used in the Scratch Discussion Forums and Scratch Wiki, as well as other sites with the included JavaScript. They looked like this:

when green flag clicked
go to x: (0) y: (0) // center the sprite for the first stamp
stamp
forever
go to x: (pick random (-240) to (240)) y: (0)
stamp
wait (0.2) secs
change [color v] effect by (pick random (5) to (14))

The version that includes all blocks from Scratch 2.0 was made by blob8108.

Editing the Block Colors

Editing the block colors.
Main article: Edit Block Colors

In the online Scratch 2.0 editor, by shift-clicking the Edit menu an option called "Edit block colors" appeared. By selecting this, a menu would appear with 3 HSL sliders and tools for modifying the block colors of a specific block category. Personalized colors could be saved to the computer, but loading the colors did not work properly.[citation needed]

In Other Programming Languages

Scratch modifications contained many new blocks that were not present in Scratch. MIT, where Scratch is made, had also created other languages using blocks such as the MIT App Inventor. Stencyl is a highly-professional language that features an entire block interface for programming real-time apps and online games. Scratch Jr also has blocks which are even more friendly for younger children to understand.

See Also