Tag Archives: Coding

Basic Movements Code In Scratch

Basic Coding Skills on Scratch

Hello, human, if you are making a plateformer on scratch and you are new, read this,otherwise, this is pretty easy for you. 

Base Movements 

I’m going to use wasd except for s for movement. First, you need to add a variable, called y-velo (velocity) or whatever that can remind you that its for your y coordinates. If you are making just a ground for you sprite, create a sprite and make your ground, then set the coordinates to X=0 and y=0. Now that the ground is done, set y-velo to 0 every time you press the green flag.

The y-velo variable for your avatar that moves

The ONLY code you need for your ground




Then you make the a and d (left and right). REMEMBER to always use change X by (), if you use the move block, you wouldn’t have any velocity. You also need to do the second code shown below or else y velo is useless.

The second code shown below

Next, I’m going to give you the code for the jumping, its not very complicated if you actually take time to look at it and see why it works that way. For me, Sprite2 is the ground.

Thanks For Reading This Blog, please recommend it to others who need help too.