The first (and most likely the easiest) thing I will teach you will be how to make a block. First in the first pane of the System Browser click Scratch-Objects. Now you have a choice, If you want a block that is for sprites only go to ScriptableSpriteMorph. If you want a block used by only the stage go to ScriptableStageMorph. If you want a block that can be used by sprites and/or the stage go to ScriptableScratchMorph. Now under the second pane where you clicked ScriptableScratchMorph/ScriptableStageMorph/ScriptableSpriteMorph there are three boxes; [instance][?][class]. Click class. Next in the third pane if you are using the shift-click R method click block specs. If you are using the Scratch Source code click scratch. Now in the fourth pane click blockSpecs. To make a block appear in the scripts pane you will need to enter a code here. Look for the word in 's that is under the category where you want your block to go, 'control' for control blocks 'operators' for operator blocks 'sound' for sound blocks etc. If your category isn't there you will need to type it behind another category name. So if you need sound under ScratchStageMorph you can go to the 'sensing' and make it 'your category' 'sensing'. Now you have to know the way of a blockspecer. Put ('what you want to be on the front of the block (for instance the next costume block would be 'next costume'' #LetterForYourTypeOfBlock(DiscussedBelow) #methodForYourBlock)
The letters for your type of block are:
#b = a boolean (diamond shaped such as the <mouse down> block) reports true or false
#r = a reporter (shaped like an oval such as the (answer) block) reports any text
#- = command (a snap together block such as the [next costume] block) does not report but rather makes something happen
#c = C shaped, mouth or loop block (a snap together block which allows command blocks inside of it such as the
[repeat ( ) block) not recommended for beginners, needs a full class in Scratch-Blocks to make
#t = timed block (shaped like a command block but uses up time like the [wait () secs] block) does not report but rather makes something happen using up a certain amount of time inserted in the number blank
#anyOtherLetter = Hat block (a starter block {when I receive [ ^]} block) not recommended for beginners, needs a full class in Scratch-Blocks to make
Now you know what type of block you want but what about an insert? How do you make one of those? You will need to decide what kind of insert you want.
%s = text or string insert (shaped like a text box like the insert in the [say [ ]] block) allows the user to type any text, insert any reporter, or insert any boolean into it
%n = number insert (shaped like an oval like the insert in the [move ( ) steps] block) allows the user to insert any number or reporter into it
%b = boolean insert (shaped like a diamond such as the [if < > block) allows the user to put any boolean block into it
%c = color pallet (shaped like a box like in the [set pen color to [#]] block and will randomly put a color in before dragged out of the blocks pane) allows the user to either move their mouse which will turn into a color dropper anywhere on the scratch application to choose the color under their mouse or they can choose from the color pallet
%C = color (shaped like a box and will randomly put a color in before dragged out of the blocks pane not on any block) allows the user to move their mouse which will turn into a color dropper anywhere on the scratch application to choose the color under their mouse but CANNOT chose from the color pallet
%d = direction menu (is a number insert but will also have a drop down menu like in the [point in direction ( ^)] block) allows the user to chose from a direction or type in a number
%D = midi drum menu (is a number insert but will also have a drop down menu such as the first insert in the
[play drum ( ^) for () beats] block) allows the user to chose from a drum or type in a number
%e = event or broadcast menu (is shaped like a box and will allow any reporter to fit into it like in the [broadcast [ ^]] block) allows the user to chose from a list of broadcasts
%f = match function names (shaped like a box but will not allow anything into it like the first insert in the ([ ^] of () ) block) allows a user to choose from a list of math functions
%g = graphic effects names (shaped like a box like the first insert of the [change [ ^] effect by ()] block) allows the user to choose from a list of graphic effects
%H = hookup sensor names (shaped like a box like in the ([ ^] sensor value) block) allows users to chose from the sensor names of a Pico board or microphone and if you have mesh can get the variables from the other computer
%h = hookup boolean sensor names (shaped like a box like in the <sensor [ ^]?> block) allows users to chose from the sensor boolean names of a Pico board
%I = midi instrument menu (is a number insert but will also have a drop down menu like in the [set instrument to [ ^]] block) allows the user to chose from a instrument or type in a number
%i = list index menu (is a number insert but will also have a drop down menu like the first insert of (item ( ^) of [ ^]) block) allows a user to choose from the list index list (1, last or any)
%k = key names (shaped like a box like in the <key [ ^] pressed?> block) allows the user to choose from a list of keyboard keys
%L = list variable menu (shaped like a box like in the (length of [ ^]) block) allows a user to choose from a list of all the user's lists
%l = costume names (shaped like a box and reporters can be dropped into it like the [ switch to costume [ ^]] block) allows a user to choose from the costume index names
%m = sprite names (shaped like a box and reporters can be dropped into it like the [go to [ ^]] block) allows a user to choose from the sprite names
%M = motor names (shaped like a box not on any block) allows a user to choose from the motor names ('', A or B)
%N = note selector (is a number insert but will also have a drop down menu such as the first insert in the
[play note ( ^) for () beats] block) allows the user to chose from a piano for a note or type in a number
%S = sound names (shaped like a box and reporters can be dropped into it like the
[play sound [ ^]] block) allows a user to choose from the sound names
%v = variable names menu (shaped like a box like the [show variable [ ^]] block) allows a user to choose from the variable list
%W = motor directions (shaped like a box like the [motor direction [ ^]] block) allows a user to choose from the motor directions (this way, that way or reverse)
%x = scene names (shaped like a box and reporters can be dropped into it not on any block) allows a user to choose from the scene names was discovered by Pecola1 (me) when he was looking at the different types of inserts. Part of Obsolete blocks also found by Pecola1 which allows you to save the costumes of all sprites and stage and later can set scene to and everything will set back!
%y = list index for delete menu (is a number insert but will also have a drop down menu only used as the first insert of the [delete ( ^) of [ ^]] block) allows the user to chose from the delete menu or type in a number
Last edited by Pecola1 (2011-02-28 20:33:39)
Offline
Jwosty wrote:
Nice start! BTW: You spelt previous wrong.
![]()
LOL just noticed that! I did the block so many times because of choosing, Maybe it should be a control, or possibly a sensing or operator.
Offline
Jwosty wrote:
Nice start! BTW: You spelt previous wrong.
![]()
you spelled spelled wrong. LOL Hypocrite
Offline
Great tutorial! Very helpful!
Offline