Discuss Scratch
- Discussion Forums
- » Suggestions
- » Suggesting Scripts with [Scratchblocks]
- liam48D
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
BIG restart on May 28, 2014!!
Suggesting Scripts with [Scratchblocks]
Answers to the [scratchblocks]This tutorial covers how to use [scratchblocks]. [scratchblocks] is a tag in the Scratch Forums that let you write Scratch scripts in your own threads!
Making your first [Scratchblocks]
Let's see what we're going to make!
move (10) steps
OK, so that is awesome. Plus, it's not an image! Try dragging your mouse over the text. it should highlight the text, rather than drag an image!
But how did I make it?
As it turns out, I used the [scratchblocks] tag. If you haven't guessed. Try writing this in the topic replier - oh wait, you probably shouldn't do that in this tutorial area. There's actually a [scratchblocks] official testing topic, made by the quite cool jvvg. You can try out your scripts there without worry.
[scratchblocks]
[/scratchblocks]
Ok, so now we have the tag. Not that you can actually tell, as you can't see your post yet. And even if you could, you still wouldn't see anything, because it doesn't have any code.
But anywho; let's get quickly to seeing our code, so that when it's made, we can make sure we didn't make any errors. To preview your post, just click on the “Preview” button; it's a green check mark button on the far right of the tool bar in the text editor.
And.. great, nothing really happened. But a new box did appear in the bottom of the screen, and that's where you can see your scripts!
Technical Coolness: The Preview box resets every time you click one of the buttons in the toolbar, or you click enter on your keyboard.
Soo, now you can see the result of the code you write. Awesome. But there is no code, so there is no restart - let's make some code!
// Ok, so let's make a block in our [scratchblocks] tag. [scratchblocks] // We are going to put some code here. move (10) steps // Now we need to close the [scratchblocks] tag, or our scripts will continue on to other stuff in our post. [/scratchblocks] // Awesome!
move (10) steps
Just put that code inside your post, hit enter (not literally xP), and enjoy!
If you can't
Reporters and Inputs
// Here, we will make a new type of block: "( )". [scratchblocks] ( + ) [/scratchblocks] // Try making this in your script.
( + )We got a variable looking thing. Maybe this will work..
// Maybe a different approach will make it look like the "(5 + 3)" block. [scratchblocks] (5 + 3) [/scratchblocks]
(5 + 3)Nope, still a variable.
This is because we aren't dealing with inputs the right way. Remember our "move (10) steps" block? Well, we put parenthesis around the “10”. We have to do that with (almost) every input, so let's do that.
// Ahem. Are you not going to? The answers are in the answer area.
((5) + (3))There's also the “<…>” block to make booleans, but they don't work well and just display as a normal reporter.
<I am a boolean!>
<I am a boolean!>Plus that's an obsolete block.
Technical Coolness: Technically, there is the “{}” block input container that will put a block in a block, but we'll get to that later.
There may or may not be very much here yet. I am adding more!
Last edited by liam48D (May 28, 2014 21:10:48)
202e-202e-202e-202e-202e UNI-CODE~~~~~
- AonymousGuy
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
I already knew this.
Should there be some sort of Scratchblocks documentation?
Also, should this be stickied?
Should there be some sort of Scratchblocks documentation?
Also, should this be stickied?
- liam48D
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
I already knew this.
Should there be some sort of Scratchblocks documentation?
Also, should this be stickied?
1. Lol! xD
2. There should TOTALLY be. Somebody needs to make the wiki page better.
3. Yes! It'll make it a lot easier to suggest stuff!
202e-202e-202e-202e-202e UNI-CODE~~~~~
- Paddle2See
- Scratch Team
1000+ posts
Suggesting Scripts with [Scratchblocks]
Cool stuff - I didn't know you could force blocks into particular shapes. This should totally be added to the Wiki documentation of Scratchblocks
Scratch Team Member, kayak and pickleball enthusiast, cat caregiver.
This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.
(credit to Za-Chary)
;
- liam48D
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
Yup! I think it's awesome! Cool stuff - I didn't know you could force blocks into particular shapes. This should totally be added to the Wiki documentation of Scratchblocks
EDIT: I noticed that you can't use C Blocks as inputs.
Last edited by liam48D (May 24, 2014 13:23:44)
202e-202e-202e-202e-202e UNI-CODE~~~~~
- Blaze349
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
So did I I already knew this.
Should there be some sort of Scratchblocks documentation?
Also, should this be stickied?
- liam48D
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
Lol, maybe some people do know this.
Plus, I think Paddle2See or somebody is adding this info to the Scratch Wiki!
Plus, I think Paddle2See or somebody is adding this info to the Scratch Wiki!
202e-202e-202e-202e-202e UNI-CODE~~~~~
- AonymousGuy
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
Did you know about the
block shape?
:: ring
when gf clicked
launch ({say [Hello!]}:: grey ring) :: control //"Snap!" script!
- MeDiaMond
- Scratcher
500+ posts
Suggesting Scripts with [Scratchblocks]
I didn't. It's cool! Did you know about theblock shape?:: ringwhen gf clicked
launch ({say [Hello!]}:: grey ring) :: control //"Snap!" script!
You really didn't know that? Cool stuff - I didn't know you could force blocks into particular shapes. This should totally be added to the Wiki documentation of Scratchblocks
- liam48D
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
Wow, I'll have to add that! Thanks! Did you know about theblock shape?:: ringwhen gf clicked
launch ({say [Hello!]}:: grey ring) :: control //"Snap!" script!
202e-202e-202e-202e-202e UNI-CODE~~~~~
- djdolphin
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
I think this *is* already documented on the wiki somewhere…Block Plugin/Syntax#Hacks
Last edited by djdolphin (May 25, 2014 11:00:22)
!
- davidkt
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
I already knew this, but great thread! This should be stickied!
Remember when I looked like this? I still do.
Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
- davidkt
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
No, I didn't! Did you know about theblock shape?:: ringwhen gf clicked
launch ({say [Hello!]}:: grey ring) :: control //"Snap!" script!
{::ring motion}::ring operators
Last edited by davidkt (May 27, 2014 20:06:44)
Remember when I looked like this? I still do.
Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
- liam48D
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
I knew I saw this stuff on the wiki SOMEWHERE.
202e-202e-202e-202e-202e UNI-CODE~~~~~
- Oui1024
- Scratcher
40 posts
Suggesting Scripts with [Scratchblocks]
({ move () steps })
So, like that kinda?
l00mynarti confirm8d/color]
YOU SAW NOTHING.
- ev3commander
- Scratcher
500+ posts
Suggesting Scripts with [Scratchblocks]
Well, that failed.(Hiiiii.::ring)
Here's my code:
[scratchblocks]
(Hiiiii.::ring)
[/scratchblocks]
- liam48D
- Scratcher
1000+ posts
Suggesting Scripts with [Scratchblocks]
Well, that failed.(Hiiiii.::ring)
Here's my code:[scratchblocks]
(Hiiiii.::ring)
[/scratchblocks]
(stuff ( Hi! ) :: grey ring )
(stuff ( Hi! ) :: grey ring )
202e-202e-202e-202e-202e UNI-CODE~~~~~
- Discussion Forums
- » Suggestions
- » Suggesting Scripts with [Scratchblocks]