My Blocks: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
[[File:DefineBlockButBroken.png|thumb|The broken 'define {return(1)}' blockset]]
[[File:DefineBlockButBroken.png|thumb|The broken 'define {return(1)}' blockset]]
'''My Blocks''' is a category that originated from Scratch.
'''My Blocks''' is a category that originated from [[Scratch]]. When a custom block is created, there is a define hat block that shows up. The code for a custom block is put under its define block. For example:
<scratchblocks>
define go to x: 5
set x to (5)

when this sprite clicked
go to x: 5
</scratchblocks>
Whenever the sprite is clicked, the sprite will go to an [[x position]] of 5.

Inputs can be added to custom blocks, for use in the define code. For example:
<scratchblocks>
define delete (item num) of list
delete (item num) of [my list v]

when this sprite clicked
delete (1) of list
</scratchblocks>
Whenever the sprite is clicked, the 1st item of the list called "my list" will be deleted.


Custom blocks in [[PenguinMod]] can be set to a specific block type (reporter, cap, boolean, and stack [default]), or be set to a custom color, with a list of preset colors being available. To select a preset color, just simply click the color.
Custom blocks in [[PenguinMod]] can be set to a specific block type (reporter, cap, boolean, and stack [default]), or be set to a custom color, with a list of preset colors being available. To select a preset color, just simply click the color.
==New Blocks==
==Blocks==
*[[Return () (My Blocks)|return ()]] (allowing the returning of values)
*[[Return () (My Blocks)|<sb>return ()::custom cap</sb>]] (allowing the returning of values)
==Trivia==
==Trivia==
*In Scratch 2.0, this category was called More Blocks, was purple instead of pink, and there was a way to set the color (but this affected all custom blocks).<ref>https://en.scratch-wiki.info/wiki/My_Blocks</ref><ref>https://en.scratch-wiki.info/wiki/Edit_Block_Colors</ref>
*In Scratch 2.0, this category was called More Blocks, was purple instead of pink, and there was a way to set the color (but this affected all custom blocks).<ref>https://en.scratch-wiki.info/wiki/My_Blocks</ref><ref>https://en.scratch-wiki.info/wiki/Edit_Block_Colors</ref>