Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » my blocks
- iheartcocoapuffs
- New to Scratch
1 post
my blocks
when you make the “my blocks” also known as “custom blocks” how do you use them?
help me with these blocks! please and thank you.
help me with these blocks! please and thank you.
- helloworldbyeworld
- Scratcher
1000+ posts
my blocks
My blocks (or custom blocks) are just a script that runs whenever you use the block. They are useful when you want to run the same script multiple times without repeating that script many times. To create a block, go to the ‘My Blocks’ section in the block palette and press ‘Make a Block’. Type in the name of the block and press OK. You can add inputs while creating the block, which behaves like variables which has the value that you specify when calling the block. If you enable the ‘run without screen refresh’ checkbox while creating the block, the block will run without refreshing the screen very fast. After you create the block, just add other blocks below the block definition. A block definition looks like this:
I hope this helps!
define a block
do something
if <something> then
some more stuff
end
I hope this helps!
Helloworldbyeworld | 1200+ posts
Have a great day
- ReinoScreech
- Scratcher
500+ posts
my blocks
What they do is that if you use them, it will trigger other code to save space. when you make the “my blocks” also known as “custom blocks” how do you use them?
help me with these blocks! please and thank you.
Here’s an example:
define block
move (...) steps
show
wait (...) secs
hide
- han614698
- Scratcher
1000+ posts
my blocks
You can do this:
define move (x) stepswill move 10 steps.
move (x) steps//;
move (10) steps::custom stack
<Scratch Wikian | Forum Helper | Almost to 6000 Posts! | Please be aware I may mistype things, my wrist is fractured>
Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why
- rudrav
- Scratcher
53 posts
my blocks
My Blocks/custom blocks are useful to repeat one script many times!
They are even used to store data like variables.Using run without screen refresh can speed up your Projects!
To know more about My blocks go on: https://en.scratch-wiki.info/wiki/My_Blocks
Hope this helps you.
They are even used to store data like variables.Using run without screen refresh can speed up your Projects!
To know more about My blocks go on: https://en.scratch-wiki.info/wiki/My_Blocks
Hope this helps you.
- Discussion Forums
- » Help with Scripts
- » my blocks