Custom blocks in scratch 2.0
First lets look at the “glide ( ) secs to x:( ) and y:( )” block
This is what will happen
If we didn’t have the glide block, we would have to put THIS code each time we want to glide

What a pain!We cannot possible put this code each time we want to glide!Good thing we have the glide block!
But there is a way using custom blocks to not repeat putting same codes again and again.
To start, go to
and click
. You should get this.
Now you can name your block anything you like.
Lets say I name the block jump.Then click OK.
This is what will happen:
Now first lets plan what should happen when we put the jump block.
This should happen.
Try this code. It will work.
Now we define the block like this.
Now lets use it like this.
Now when you press the space key, your sprite will “jump”
But what if you could do this?
To achieve this, first right click the Define and say edit.
You should get this
Click on options to get this
Now click on “add number input” and name it “height”
Then add 2 labels as “x:” and “y:” and so add their number inputs
DO NOT click on “Run without screen refresh” and click OK.This is what will happen.
Now do this
Now you can keep changing the values for different conditions.
Maybe you can do this:-
Now the sprite will jump higher if the up arrow is pressed😀.You can use these codes to create games which need jumping.
Run without screen refresh is useful for things you do not want to be shown.
And this is even because of griffpatch_tutor
for his project on scratch
Custom blocks tutorial. I do prefer you see it.
So, was this website useful? Please write down your feedback.