Eng:Block Plugin

The Block Plugin, also known as scratchblocks2, is a plugin for the Scratch Wiki and Scratch forums created by blob8108 that allows script images to be constructed through text that is parsed and rendered. You can try playing around with the plugin on this or this testing page.

It is a complete rewrite of the old plugin by JSO that was used on the old Scratch forums.

Example: define dance (speed) set [dist v] to ((speed) * (distance to [mouse-pointer v])) repeat until <(timer) > [10]> move (dist) steps next costume play note (pick random (40) to (100)) for (0.5) beats say [Wow! Scratch 2.0 scripts on the Wiki!] end

Basic Syntax
On the Scratch Wiki, code must be inserted between the  tags, while on the forums they are inserted between   tags.

The block plugin tries to match the code you write as closely as possible, and does not check you've used the correct syntax. The block text is only used to find the correct color.

The basic syntax of for the Block Plugin is as follows:

Advanced Syntax
More in-depth documentation of the scratchblocks2 plugin is listed here:

Helper Tools
There are a few tools that you can use that will take blocks directly from a Scratch project, and turn them into text that you can paste inside a  tag.

For Scratch 1.4

 * The Scratcher LS97 developed a plugin for the Scratch program that converts a script to ScratchBlocks code. The forum thread for this plugin is [ here].

For Scratch 2.0

 * blob8108 developed a JavaScript converter for Scratch 2.0 that will convert an entire project, and the code for that is here.


 * jvvg developed a PHP version that will convert scripts in users' backpacks, and the forum thread is here.