TRY THIS 🔥 - Jump and GRAVITY in Scratch tutorial
Vložit
- čas přidán 15. 02. 2023
- #scratch #scratchtutorial #platformer #gravity #tutorial #codingtips #quicktutorial
Watch full tutorial here: • How to make JUMP and G...
In this video I will show you how to make a JUMP and GRAVITY in Scratch - short tutorial.
Scratch site:
scratch.mit.edu/projects/editor
My scratch tutorials:
• Do this to make Endles...
Minecraft games on Scratch tutorials:
• RUN AWAY FROM CREEPER ...
For everybody, use a touching ground instead of a touching color for smaller sprites.
Thanks,really helps out👍
gooood
why does your comment says 2 replies when there is only one reply?
Bcuz u replied
@@andreia7391i think bc someone delete the comment
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.
Thank you this realy helped
Thanks dude! It helped so much and it’s so simple
this is amazing! I'm making a jumping simulator and really needed this!
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
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!
Rocket jumps fixed later!❤
Awesome tysm bro 🙂🙂
Who made me good at coding:
Self-taught: 10%
My teacher: 30%
This yt: 55%
Like me!
thank you soo much ty
tyyyyy!
Thank you soo much for this easy tutorial, I just needed this in my game!
Thank you so much i just forgot how to do jump script
I LOVE CATTTY THE SCRATCHYYY
Thx man ❤
Thx imma use this for something I think will be good :)
tysm tysm tysm tysm tysm tysm tysm tysm tysm tysm
good job bud!
There’s an easier way but this is still useful
PvzJosh2:wow great job!
Thank you for this tutorial
thanks now i can make the jumping mechanic in scratch
I remember using it once best childhood ever
woah it actually worked thx
Brow the next griffpatch
Bro isn’t the next griffpatch
Bro learn how to take a joke 💀
@@laithsllearn how to spell💀
learn to make them. @@laithsl
@@LEGENDARY_CHEDDARLearn how to not argue over a scratch joke 💀
It pulls me back the beggining
Thank you so much
thanks for telling some codes now i know what to do
Ey nice i learned it from this tut but now im way better thanks
Work harder than smarter takes that to next level
Wow THIS VIDEO CHANGE MY LIFE!!
so useful
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
😍😍😍😍
Cool
yyeeeeeeeeeahhhhhhh
tysm
Thanks now I know. I've been trying to do this.
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
Change y by (1)
end
change y by (-1)
stop this script
How do I make the sprite not jump infinitely
Only make it jump if it’s touching the ground
@@Jekasnaka
Thanx I remember I saw this before (probably by griffpatch) and forgot about it
Thank you
Just add gravity and make move like 5 up when space is pressed.
I Will Try This but Its Perfect
Thx
Just do when green flag clicked forever change gravity by -1 then put change y by gravity then just make it so its only doing that if not its touching the ground sprite or the color of the ground and then put if key space or key up arrow pressed set gravity to 12
Coding in scratch is op
Right
This is interesting 🎉
love it
Thank you so much I’m new to scratch so this will be a lot
Same
what your profile? mines stevenberry
thx
You can do better but you need Y velocity to do it And you can move while jumping
thank to tutorial
I can finally make my dinosaur game
what is so funny is that i have made code like this myself at the age of 11
Way more intense than left or right 😅
Totally gonna use this. Thank ya.
Kon sa application se create kar rahe ho bhai
if you pick up the sprite the speed goes up and body slams the sprite
Griffpacht
This is really useful for cutscenes, but is not as good in platformer games
How does it work with right and left key
Griffpatch is probably raging at the fact that this is probably the simplest way of making gravity while it took like 30 minutes for griffpatch to make gravity
BRO DID I JUST WASTE MY TIME TRYING TO REMEMBER IT ON TV 😭😭😭😭😭😭😭😭
tysm I need this for my game
Thanka
Song name: it was time
Good
For everybody, use a sprite
For you groud
So you don't have to make it the same colour
I keep forgetting to use this all I do is just the same thing as the first script and add more repeats
Yoinkity splikity
Thats only for a platformer games so this one i know tho i forgot but thanks! I appreciate so much of you! 🤭
Can you make a tutorial where the sprite bounces a bit after hitting the ground
I got ya!
1st step:use the method on this vid.
2nd step:add a variable called bounce power (or just bounce).
3rd step:when the sprite touches the ground, set bounce power to how tall you wanna be and then change it by -1 so the sprite won't just fly off.
4th step:when the sprite touches the ground change y by bounce power.
if there is any mistakes tell me!
how do i make one where i can only jump?
Please where can I get the scratch app please
bro, teach me how to do this command but with a button
i accidentally went beyond and made 3 custom blocks to make a full engine for this with smoother jumps...
Wow I did not know this thanks
people who just started scratch: am i a joke to you?
Sooo.... I need to scrap my hardwork?
Edit:wth just happend?
Uh, maybe?
You could just do it differently
@@imakemymark2467 uhh. You're late. But... Eeh. I left scratch and learn actual coding on mimo.
Guys pls Explain How it works
I can't understand just made it but I wanna know how it works
now there is overlap the playr is going in th floor !
how may i do
what if u hold IT
Why does everyone use if touching colour?
I will do this in my computer remember the 👍🏻 code
there is no need to use variables instead do this:-
when flag clicked
forever
if touching color (any color)
change y by -0
else
change y by -20
Blud use if touching level, and yes you do need that lil kid
It work :O
how you learn this? ITS AMAZING
Thanks :)
(REAL) you need a gravity variable for this sprite only code: when greenflag clicked forever if not touching ground then change y by gravity change gravity by -1 jump: set gravity to 15 you need a ground sprite
for me is not jumping is teleport up and than slowly down
But how do i tap "space" in mobile?
You just jump 🏃
0:01
0:30
😅😊,,scratch
0:00
Or you could:
Make a 'gravity' variable
Make a ground sprite
When green flag clicked
Forever
Change gravity by -1
Change Y by gravity
If touching {ground sprite}
Set gravity to 0
If key space pressed
Set gravity to 12
No that won't work because you forgot to add
When green flag clicked
Set gravity to 0
Forever
Etc...
That's because if you don't add "set gravity to 0" at the start, your character will fly downwards really fast at the start if you keep clicking green flag
Watch full tutorial here: czcams.com/video/RO8OE8jcIks/video.html
i dont need full i just neeed shorts because i wear shorts
Bro you can just take the forever and only if block
I just wasted my time to remember it 😭😭😭
Hocammm bo dakka siz bu oyunun di l seçimini türkce yaptiniz❤😂
samandar
Thanks every time I move jump don't work
Im jumping IN the ground