TRY THIS 🔥 - Jump and GRAVITY in Scratch tutorial #shorts

preview_player
Показать описание
#scratch #scratchtutorial #platformer #gravity #tutorial #codingtips #quicktutorial

In this video I will show you how to make a JUMP and GRAVITY in Scratch - short tutorial.

Scratch site:

My scratch tutorials:

Minecraft games on Scratch tutorials:
Рекомендации по теме
Комментарии
Автор

For everybody, use a touching ground instead of a touching color for smaller sprites.

Sethanon
Автор

It’s not a big deal, but for a cleaner look to your game, you can make the ‘If touching (certain color or object)’ script into a custom block that runs without screen refresh. It makes it so that you don’t see the sprite rise up from the ground after hitting it.

hoodedhero
Автор

If you don’t want it to sink into the ground, this is what you do:
- make a custom block, name it whatever.
- make it run without screen refresh
- put the block in the code that breaks its fall
- put this script for the custom block:

define: blah
repeat until <not touching(colour)>
Change y by (1)
end
change y by (-1)
stop this script

Literally_Weird_Studios
Автор

How to actually make a jump:
Make variable called "speed y"
Make variable called "GRAVITY"
When green flag clicked:
Set "GRAVITY" to -1
Set "speed y" to "GRAVITY"
Forever
Change Y by "speed y"

Forever
If
Touching color (color of your level backdrop or ground)
Then: Set "speed y" to 0
Repeat until: NOT touching color (color of your level backdrop or ground)
Change y by 1

Forever
If "space" pressed?
Then:
Set "speed y" to 12

Thx for reading me!
You can also use events for the jump too!

gabriellebilo
Автор

Thanks dude! It helped so much and it’s so simple

jonahlp
Автор

Literaly have a high school tech progect for scratch due in 8 hours - this saved me at least 2 of them! thank you bro

cheeseman
Автор

this is amazing! I'm making a jumping simulator and really needed this!

NoobShadeCarls
Автор

Thank you soo much for this easy tutorial, I just needed this in my game!

armybrain
Автор

For mobile, use mouse down instead of key space pressed.

abdisalandhore
Автор

Ey nice i learned it from this tut but now im way better thanks

CSCrossSkull
Автор

Your maze game is amazing 🎉🎉
I have tried it in my school laptop.
It is nice 👍.

ManojKumar-nxj
Автор

Thx imma use this for something I think will be good :)

Duck_man_tds
Автор

I remember using it once best childhood ever

Ronin-
Автор

If you have more than one colour or plan to add more than one colour use the touching sprie button under sensing. This will only work if your backdrop is a sprite

muki
Автор

thanks for telling some codes now i know what to do

wah_shee
Автор

thanks now i can make the jumping mechanic in scratch

yelgdr
Автор

You could also do a more technical and efficient way if you create your own block and make it run without screen refresh (name is gravity) then make a variable called gravity. Make your first like of code and do when start click> forever(custom block gravity inside forever ) then make a second list of blockes under your gravity custom block. Make this Gravity custom block>change gravity variable by -1>change y by gravity> add a if block and inside do> if touching sprite two change gravity to 0> and change y by 1. For jumping do if key pressed set gravity to 15. Hope this helps

zaidenmckay
Автор

it was a bit glitching and i couldn't get rid of it

ProGuy_
Автор

Thanks now I know. I've been trying to do this.

victoriaokoye
Автор

Thank you so much I’m new to scratch so this will be a lot

Coolguy-