Seeing as some scratchers don't know how to make scratchblocks, how others don't know how to make some scratchblocks, and that there really hasn't been a guide to scratchblocks, I decided to make a guide on scratchblocks in general. If you see something that needs to be added/changed, just say.
Content:
Making Scratchblocks
Fixing Scripts
Scratchblock Etiquette
Credits
{|Making Scratchblocks|}
I could give you the code for every scratchblock there is in scratch, but do you know how long that would take to type? Instead, I'll teach you a different way.
To make a scratchblock, put it in between [scratchblocks] [/scratchblocks] tags. Then, type what you would see in Scratch. For example, in scratch, the green flag hat block has "when gf (green flag) clicked", so you would type "when gf clicked".
Now, the one exception to this is the c-blocks (repeat, if, ect.. Excluding forever and forever if.) which you'll have to put "end" where you want the c-block to end. Other than that, there should only be one block per line.
Now into the finer details:
If you want to add a drop down menu, use [ v]. If you want to add a place where you can type, again use ( ) or [ ]. And if you want to add arrows, type cw (clockwise) or ccw (counter-clock wise).
Along with that, if you want to add a colored box, just type a color's HEX code inside [ and ], some of which can be seen here. Also, if you want to leave a comment, use // after a scratchblock and type your comment after the two dashes.
Into conditionals/variables:
Basically, they follow the same rules as above, except variables should have parentheses around them. Also, any block that normally has pointy ends should have < and > surrounding them. Now, your almost done.
The two exceptions:
One exception to all of the above happens to be the "when sprite clicked" hat block. For some reason, you always have to type it as "when [sprite2 v] clicked" when you really should type "when sprite2 clicked" My only tip is to memorize this, which should be easy. The other exception is the "stop all sounds" block which is red no matter what you do, unless you type "stop all pinks".
Anyway, here's a sample code:
when [sprite2 v] clicked set [pie v] to (98) if <not <(pie) < (5)>> repeat (5) turn cw (5) degrees say [Pie!] for (5) secs//This is a comment. end end forever if <touching color [#00FF00]?> go to x: (5) y: (4) stop all pinks
[scratchblocks] when [sprite2 v] clicked set [pie v] to (98) if <not <(pie) < (5)>> repeat (5) turn cw (5) degrees say [Pie!] for (5) secs//This is a comment. end end forever if <touching color [#00FF00]?> go to x: (5) y: (4) stop all pinks [/scratchblocks]
Congradulations on learning how to make scratchblocks!
Remember, if you ever want more practice, you can go here, or if you want to have a program create your code for you, you can go here.
{|Fixing Scripts|}
if (touching [mouse v]? if <(mouse)>(5)> go to x (5) y (6) end endHave you ever gotten an if statement like this? Do your scripts always look red when they shouldn't? Well follow these tips and you should be fixing scripts more quickly!
Last edited by ErnieParke (2013-01-12 11:30:58)
Offline
Dazachi wrote:
Nice guide!
Thanks!
Anyway, I'm curious, did you find any part of the guide confusing? Is there anything you would like to see added to this guide? Thanks in advance for your feedback!
Offline
to be honest, I don't think I need to read it. not because I was put off by the start, because it's a topic where you can't really go wrong. Perhaps it's a bit long considering what you're trying to help scratchers do, perhaps you should start with an X-Step Quick Guide, then go into detail and keep everything you've written underneath. oh, and nice guide!
Offline
Borrego6165 wrote:
to be honest, I don't think I need to read it. not because I was put off by the start, because it's a topic where you can't really go wrong. Perhaps it's a bit long considering what you're trying to help scratchers do, perhaps you should start with an X-Step Quick Guide, then go into detail and keep everything you've written underneath. oh, and nice guide!
Part of the reason why it's long is due to the fact that I talk about etiquette and fixing scripts, though I agree, the Making Scratchblocks section does seem a bit long. I'll see what I can do. Anyway, thanks for the feedback!
Offline
GenChico wrote:
Pretty cool guide, helped a lot with understanding the basics of scratch blocks. I would definitely refer people to this If they needed help with scratch blocks.
Well I'm glad to here that you've fully understood scratchblocks and that you trying to help others do the same thing!
Offline
You should mention that when scratchblocks go red even when they look the same as in scratch, it is usually a missing question mark or the British spelling of colour instead of color. Also mention that the stop all sounds blorck always goes red even when it looks just like the text in scratch is.
Edit: you forgot to mention how to add colours.
Last edited by joefarebrother (2012-11-11 10:02:36)
Offline
Ideas wrote:
Excellent guide, you should add step by step guide to making variables and lists for each varible and list block.
Scratch on.
Well this guide already covers that; just type what you would see in Scratch. Other than that, thanks!
joefarebrother wrote:
You should mention that when scratchblocks go red even when they look the same as in scratch, [1] it is usually a missing question mark or the British spelling of colour instead of color. [2] Also mention that the stop all sounds blorck always goes red even when it looks just like the text in scratch is.
[3] Edit: you forgot to mention how to add colours.
1). I completely forgot about that, so thanks for reminding me. I'll add that when I have time.
Edit: Added.
2). I never knew about that, or at least I did at one point but I forgot afterwards. I'll add it when I can.
Edit: Added.
3). And what do you mean by adding colours?
Last edited by ErnieParke (2012-11-11 11:24:38)
Offline
ErnieParke wrote:
Ideas wrote:
Excellent guide, you should add step by step guide to making variables and lists for each varible and list block.
Scratch on.Well this guide already covers that; just type what you would see in Scratch. Other than that, thanks!
joefarebrother wrote:
You should mention that when scratchblocks go red even when they look the same as in scratch, [1] it is usually a missing question mark or the British spelling of colour instead of color. [2] Also mention that the stop all sounds blorck always goes red even when it looks just like the text in scratch is.
[3] Edit: you forgot to mention how to add colours.1). I completely forgot about that, so thanks for reminding me. I'll add that when I have time.
2). I never knew about that, or at least I did at one point but I forgot afterwards. I'll add it when I can.
Edit: Added.
3). And what do you mean by adding colours?
3. He means, for example:
<touching color [#FF0000]?>is
<blah blah [#FF0000]?>
Offline
awesomeness321 wrote:
ErnieParke wrote:
Ideas wrote:
Excellent guide, you should add step by step guide to making variables and lists for each varible and list block.
Scratch on.Well this guide already covers that; just type what you would see in Scratch. Other than that, thanks!
joefarebrother wrote:
You should mention that when scratchblocks go red even when they look the same as in scratch, [1] it is usually a missing question mark or the British spelling of colour instead of color. [2] Also mention that the stop all sounds blorck always goes red even when it looks just like the text in scratch is.
[3] Edit: you forgot to mention how to add colours.1). I completely forgot about that, so thanks for reminding me. I'll add that when I have time.
Edit: Added.
2). I never knew about that, or at least I did at one point but I forgot afterwards. I'll add it when I can.
Edit: Added.
3). And what do you mean by adding colours?3. He means, for example:
<touching color [#FF0000]?>isCode:
<blah blah [#FF0000]?>
Oh... I'll add that.
Edit: Added.
Last edited by ErnieParke (2012-11-11 11:25:03)
Offline
Martiscratch wrote:
btw,If you want other colours use this.
Either that or you can use the color picker in Gimp, write your own (strongly recommended ), or use http://www.2createawebsite.com/build/hex-colors.html
Offline
Martiscratch wrote:
btw,If you want other colours use this.
I didn't even know about that, and I really like the program, so I'll use that link instead. Thanks!
Offline
ErnieParke wrote:
"stop all sounds" block which is red no matter what you do.
Actually,
stop all sounds//This doesn't work. Instead, use: stop all pinks//This is what works.
Offline
awesomeness321 wrote:
ErnieParke wrote:
"stop all sounds" block which is red no matter what you do.
Actually,
stop all sounds//This doesn't work. Instead, use: stop all pinks//This is what works.
Yeah, EP knows, but technically that's not "stop all sounds".
Offline
Gravitation wrote:
awesomeness321 wrote:
ErnieParke wrote:
"stop all sounds" block which is red no matter what you do.
Actually,
stop all sounds//This doesn't work. Instead, use: stop all pinks//This is what works.Yeah, EP knows, but technically that's not "stop all sounds".
Well, he should at least mention it.
Offline
awesomeness321 wrote:
Gravitation wrote:
awesomeness321 wrote:
Actually,
stop all sounds//This doesn't work. Instead, use: stop all pinks//This is what works.Yeah, EP knows, but technically that's not "stop all sounds".
Well, he should at least mention it.
If you look again, you'll see that I added it. I think that it's nice to know, even though it's not going to be used very often. Also, you could get a lugh or two from it.
Last edited by ErnieParke (2012-11-11 14:05:51)
Offline
Another thing:
Many people type:
say [whatever] for (2) secondsSo you should explain that you need to type 'secs' instead of 'seconds'.
Offline
awesomeness321 wrote:
Another thing:
Many people type:say [whatever] for (2) secondsSo you should explain that you need to type 'secs' instead of 'seconds'.
I should have added that, but I hadn't, so thanks for pointing this out! If you look above again, you'll see that I added it.
Offline
ErnieParke wrote:
awesomeness321 wrote:
Gravitation wrote:
Yeah, EP knows, but technically that's not "stop all sounds".Well, he should at least mention it.
If you look again, you'll see that I added it. I think that it's nice to know, even though it's not going to be used very often. Also, you could get a lugh or two from it.
but the problem is that
stop all pinksis'ent a real block!
Offline
stop all pinks motion on reset timer add (volume) to [scratchblocks v] set tempo to <(HP or (Timer)> stop all
Offline