Hello! I decided to make a page talking about all the scratch bricks and how to make them. I find a lot of people are struggling with it! For your information, all Scratch blocks online will look boxey. First of all, type [scratchblocks-] (remove the -) to make the forum know that you are typing scratch blocks. Always place a block on another line! (press enter before you try and type another brick) To insert a stack block ( the rectangular ones with TWO bumps ), you simply type the text you see. For the white spaces you see in the brick, or the numbers or letters you can change, you either place brackets () or a box [] in it. It depends on the shape. ( It really does not matter if you use () or [], but the () one makes the background white and the [] will make the background color the same as the brick's color.) For example, if you want to add a wait brick to forum, type this:
[scratchblocks] wait (1) secs [/scratchblocks]
Preview:
wait (1) secsIf you look closely, you see a ending command ( [/scratchblock]). This is to make the forum know that you are ending making bricks. If you want to change a set variable brick, do this:
[scratchblocks] set [variablename v] to [1] [/scratchblocks]
Preview:
set [variablename v] to [1]The v beside "variablename" is the little arrow in Scratch that is used to scroll down a list of variables. Remember to put a space between the variable name and the v. Some bricks, like the turn brick, has a picture in it. To type the clockwise and counterclockwise, we replace the picture with cw or ccw. The counterclockwise brick is ccw and the clockwise is cw.
[scratchblocks] turn cw (15) degrees [/scratchblocks]
Produces:
turn cw (15) degreesand
[scratchblocks] turn ccw (15) degrees [/scratchblocks]
Produces:
turn ccw (15) degrees. Some bricks only have one bump on it. They are either ending bricks ( Stop script and Stop all ) or "Hats", the bricks that have a curved top. To make a ending brick, copy the text on it.
[scratchblocks] stop all [/scratchblocks]
Makes:
stop all. Making hats are also like making ending blocks, but the start green flag hat has a picture. Replace Green Flag Picture with gf.
[scratchblocks] when gf clicked [/scratchblocks]
when gf clicked. The other hats are easy to make. Some hats, however, has a block for selecting variables. Remember to place a "v" in them.
[scratchblocks] when [space v] key pressed [/scratchblocks]
when [space v] key pressed. Now for the blocks called "c-shaped"! These bricks are the blocks like "forever, repeat, if..." To make them, you do the same for all the bricks, copy the text, make some variable boxes. After that, place bricks that you want in the "c-shaped". To make sure that the forum knows that you are done adding things into the brick, add an "end" command.
[scratchblocks] repeat until <(variable) = [2]> say [Hello world!] for [1] secs end [/scratchblocks]
repeat until <(variable) = [2]> say [Hello world!] for [1] secs end. The <> is there because if you place the [] = [] block ( all bricks that are diamond shape like [] < [], <> and <> bricks are called a Boolean brick) into the repeat until block, it looks like a diamond shape. The variable is a () shape, so you see variable in a () shape. The number 2 is in the second box on the Boolean brick, and if you place a number into a boolean, the shape ofthe box stays the same, so you place the number (in this case, 2) into a [] box. The if..else block has two "c-shapes", to make it, you do the same for a regular "c-shaped' block. Don't forget to add the end command.
[scratchblocks] if < (variable) > [1] > say [Win!] for (2) secs else say [Lose.] for (2) secs end [/scratchblocks]
if < (variable) > [1] > say [Win!] for (2) secs else say [Lose.] for (2) secs endFor multiple "c-shaped" bricks, do the same thing.
[scratchblocks] when gf clicked repeat until < (variable) = [2] > say [Hello world!] for (2) secs set [variable v] to (pick random (1) to (2)) if < (variable) = [1] > stop script end say [Hi!] for (2) secs end [/scratchblocks]
Creates:
when gf clicked repeat until < (variable) = [2] > say [Hello world!] for (2) secs set [variable v] to (pick random (1) to (2)) if < (variable) = [1] > stop script end say [Hi!] for (2) secs endTo add color bricks, you will need to find the hex code of the color(s). Hex codes can be found here: Hex Code Link. Once you know the hex code, place it into the brick!
[scratchblocks] <color [#1ADB41] touching [#FF9100]?> [/scratchblocks]
<color [#1ADB41] is touching [#FF9100]?>Don't forget to add the number symbol (#) before you put in the hex code. To comment on bricks, use the // command.
[scratchblocks] move (1) steps // Is it too slow? [/scratchblocks]
move (1) steps // Is it too slow?If you still do not know how to make a variable block at this point, it is very easy to make.
[scratchblocks] (variable) [/scratchblocks]
(variable). To add a white text block, do this:
[scratchblocks] [Hi!] [/scratchblocks]
[Hi!]If you made an error, the forum will correct you by making the block red. For example:
[scratchblocks] wait (1) seconds [/scratchblocks]
wait (1) seconds. Did you find what was wrong? Yes! Replace "seconds" with "secs". Fixed!
Last edited by KrIsMa (2012-05-27 13:42:49)
Offline
Thanks! This will really help new scratchers.
Offline
Huh, that makes sense, i really like how you have to use the hex code, mainly because I know HTML script lol. xD This is really helpful to me! I haven't really been able to find much help for this, so thanks!
when gf clicked think [Thanks!] for (2) secs repeat until < (Webiste) = [Closed] > end
Offline
daniel_j wrote:
Huh, that makes sense, i really like how you have to use the hex code, mainly because I know HTML script lol. xD This is really helpful to me! I haven't really been able to find much help for this, so thanks!
when gf clicked think [Thanks!] for (2) secs repeat until < (Webiste) = [Closed] > end
Since this is a help with scripts section, the scratch blocks you posted does not work the way you want it. C blocks only repeat what is in them, not outside so it would look like this:
When gf clicked Repeat until < (website) = [closed] > Think [Thanks!] for (2) secs EndAnd you are very welcome!
Last edited by KrIsMa (2012-05-26 12:11:26)
Offline
[Thanks this is very helpful]
Offline
It looks like someone re-opened your topic (i noticed it in reports, and clicked over to do that, but someone seems to have gotten to it first). Now you can get the BBCode you wanted.
I have a feeling it was closed due to inactivity.
Offline
Thanks alot!!! XD
Offline