TRY THIS 🔥 - Jump and GRAVITY in Scratch tutorial

Sdílet
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 ...

Komentáře • 183

  • @Sethanon
    @Sethanon Před rokem +127

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

  • @hoodedhero8781
    @hoodedhero8781 Před rokem +24

    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.

  • @Demonstrong
    @Demonstrong Před rokem +5

    Thank you this realy helped

  • @jonahlp134
    @jonahlp134 Před 9 měsíci +2

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

  • @ArtistCarls
    @ArtistCarls Před 2 měsíci +2

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

  • @muki1481
    @muki1481 Před 11 měsíci +4

    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

  • @gabriellebilo5320
    @gabriellebilo5320 Před 3 měsíci +3

    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!

  • @yogendrakumarsharma4922
    @yogendrakumarsharma4922 Před rokem +2

    Awesome tysm bro 🙂🙂

  • @Chess_FunnyMoments
    @Chess_FunnyMoments Před měsícem +4

    Who made me good at coding:
    Self-taught: 10%
    My teacher: 30%
    This yt: 55%

  • @omaramr3452
    @omaramr3452 Před rokem +1

    thank you soo much ty

  • @Pastel-Pixie
    @Pastel-Pixie Před 9 měsíci +1

    tyyyyy!

  • @armybrain
    @armybrain Před rokem +12

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

  • @namekit7460
    @namekit7460 Před rokem +3

    Thank you so much i just forgot how to do jump script

  • @MataPlaysgames
    @MataPlaysgames Před 11 měsíci +1

    I LOVE CATTTY THE SCRATCHYYY

  • @monz4
    @monz4 Před 11 měsíci

    Thx man ❤

  • @Duck_man_tds
    @Duck_man_tds Před rokem +1

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

  • @avrulixgaming11
    @avrulixgaming11 Před rokem +1

    tysm tysm tysm tysm tysm tysm tysm tysm tysm tysm

  • @user-bi9ct1ef7l
    @user-bi9ct1ef7l Před 2 měsíci

    good job bud!

  • @PoppysLife123
    @PoppysLife123 Před rokem +1

    There’s an easier way but this is still useful

  • @aisback156
    @aisback156 Před měsícem

    PvzJosh2:wow great job!

  • @stubby2548
    @stubby2548 Před rokem

    Thank you for this tutorial

  • @nerdydogerblx
    @nerdydogerblx Před rokem

    thanks now i can make the jumping mechanic in scratch

  • @Ronin1178-1
    @Ronin1178-1 Před 11 měsíci

    I remember using it once best childhood ever

  • @Platinum285
    @Platinum285 Před 3 měsíci

    woah it actually worked thx

  • @laithsl
    @laithsl Před rokem +9

    Brow the next griffpatch

    • @Skithy
      @Skithy Před 10 měsíci +2

      Bro isn’t the next griffpatch

    • @laithsl
      @laithsl Před 10 měsíci

      Bro learn how to take a joke 💀

    • @LEGENDARY_CHEDDAR
      @LEGENDARY_CHEDDAR Před 7 měsíci +2

      ​@@laithsllearn how to spell💀

    • @JaxonPlayzReal
      @JaxonPlayzReal Před 4 měsíci

      learn to make them. @@laithsl

    • @Bunz685
      @Bunz685 Před 4 měsíci

      @@LEGENDARY_CHEDDARLearn how to not argue over a scratch joke 💀

  • @Im_mister_human_guy
    @Im_mister_human_guy Před 2 měsíci

    It pulls me back the beggining

  • @israelisrael1597
    @israelisrael1597 Před rokem

    Thank you so much

  • @wah_shee
    @wah_shee Před 8 měsíci

    thanks for telling some codes now i know what to do

  • @Ncool67
    @Ncool67 Před 16 dny

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

  • @shabanaparvin2141
    @shabanaparvin2141 Před 5 měsíci

    Work harder than smarter takes that to next level

  • @danishnuruddien8919
    @danishnuruddien8919 Před 6 měsíci

    Wow THIS VIDEO CHANGE MY LIFE!!

  • @Identity22
    @Identity22 Před 5 měsíci

    so useful

  • @zaidenmckay8247
    @zaidenmckay8247 Před 5 měsíci

    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

  • @muppek
    @muppek Před rokem +1

    😍😍😍😍

  • @oCanalDasHistoriasBloxOficial

    Cool

  • @minecraft00069
    @minecraft00069 Před 6 měsíci

    tysm

  • @victoriaokoye7437
    @victoriaokoye7437 Před 11 měsíci

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

  • @Literally_Weird_Studios
    @Literally_Weird_Studios Před 5 měsíci +1

    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

    • @Jekasnaka
      @Jekasnaka Před 4 měsíci

      How do I make the sprite not jump infinitely

    • @Literally_Weird_Studios
      @Literally_Weird_Studios Před 4 měsíci

      Only make it jump if it’s touching the ground
      @@Jekasnaka

  • @whiteslimeproductions3574

    Thanx I remember I saw this before (probably by griffpatch) and forgot about it

  • @mehmetaskn4222
    @mehmetaskn4222 Před rokem

    Thank you

  • @Mdurham09
    @Mdurham09 Před rokem

    Just add gravity and make move like 5 up when space is pressed.

  • @louzehallam7093
    @louzehallam7093 Před 3 měsíci

    I Will Try This but Its Perfect

  • @Dogedude
    @Dogedude Před 6 měsíci

    Thx

  • @Alexa_mapping
    @Alexa_mapping Před rokem

    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

  • @gacha_aby
    @gacha_aby Před rokem +3

    Coding in scratch is op

  • @hershelcaytak5312
    @hershelcaytak5312 Před rokem

    love it

  • @Coolguy123-
    @Coolguy123- Před rokem +1

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

  • @MochiMichhr
    @MochiMichhr Před 11 měsíci

    thx

  • @Rono_footballeditz
    @Rono_footballeditz Před 5 měsíci

    You can do better but you need Y velocity to do it And you can move while jumping

  • @NguyenHa-wl4hk
    @NguyenHa-wl4hk Před 8 měsíci

    thank to tutorial

  • @UrLocalMarshmallow
    @UrLocalMarshmallow Před 7 měsíci

    I can finally make my dinosaur game

  • @zuuxgrb
    @zuuxgrb Před 3 dny

    what is so funny is that i have made code like this myself at the age of 11

  • @210jmo
    @210jmo Před 4 měsíci

    Way more intense than left or right 😅

  • @trashywashere2973
    @trashywashere2973 Před rokem +2

    Totally gonna use this. Thank ya.

  • @kbshukla4126
    @kbshukla4126 Před 10 měsíci

    Kon sa application se create kar rahe ho bhai

  • @StrangeGameA
    @StrangeGameA Před 3 měsíci

    if you pick up the sprite the speed goes up and body slams the sprite

  • @lucilacoronel3367
    @lucilacoronel3367 Před měsícem +1

    Griffpacht

  • @spoki2644
    @spoki2644 Před 11 měsíci

    This is really useful for cutscenes, but is not as good in platformer games

  • @Atomiclemonade5
    @Atomiclemonade5 Před 9 měsíci

    How does it work with right and left key

  • @RegularPerson123guy
    @RegularPerson123guy Před 6 měsíci

    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

  • @deycallmemilk
    @deycallmemilk Před 5 měsíci +1

    BRO DID I JUST WASTE MY TIME TRYING TO REMEMBER IT ON TV 😭😭😭😭😭😭😭😭

  • @Loipanandfriends
    @Loipanandfriends Před rokem +2

    tysm I need this for my game

  • @FrozenTundra10
    @FrozenTundra10 Před 4 měsíci

    Thanka

  • @Ineedhelpnxhxbbdbg
    @Ineedhelpnxhxbbdbg Před 3 měsíci

    Song name: it was time

  • @dineshkumarrastogi4256

    Good

  • @Nafi_yft2202
    @Nafi_yft2202 Před měsícem

    For everybody, use a sprite
    For you groud
    So you don't have to make it the same colour

  • @diehardvn1
    @diehardvn1 Před 7 měsíci

    I keep forgetting to use this all I do is just the same thing as the first script and add more repeats

  • @kirbboiii
    @kirbboiii Před rokem

    Yoinkity splikity

  • @The_Chicken_Gun_Gang
    @The_Chicken_Gun_Gang Před rokem +3

    Thats only for a platformer games so this one i know tho i forgot but thanks! I appreciate so much of you! 🤭

  • @vikramsirur1830
    @vikramsirur1830 Před 9 měsíci

    Can you make a tutorial where the sprite bounces a bit after hitting the ground

    • @Oreo12346
      @Oreo12346 Před 6 měsíci

      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!

  • @OSCSHITPOST
    @OSCSHITPOST Před 10 měsíci

    how do i make one where i can only jump?

  • @AyoAbdulazeez-ly2cd
    @AyoAbdulazeez-ly2cd Před rokem

    Please where can I get the scratch app please

  • @jonnycm88
    @jonnycm88 Před měsícem

    bro, teach me how to do this command but with a button

  • @cirkulx
    @cirkulx Před 11 měsíci

    i accidentally went beyond and made 3 custom blocks to make a full engine for this with smoother jumps...

  • @priyankawadhwani
    @priyankawadhwani Před rokem +2

    Wow I did not know this thanks

  • @moonbun69.
    @moonbun69. Před 11 měsíci

    people who just started scratch: am i a joke to you?

  • @ArethaN.A
    @ArethaN.A Před rokem +4

    Sooo.... I need to scrap my hardwork?
    Edit:wth just happend?

    • @imakemymark2467
      @imakemymark2467 Před 8 měsíci +1

      Uh, maybe?

    • @imakemymark2467
      @imakemymark2467 Před 8 měsíci +1

      You could just do it differently

    • @ArethaN.A
      @ArethaN.A Před 8 měsíci

      @@imakemymark2467 uhh. You're late. But... Eeh. I left scratch and learn actual coding on mimo.

  • @Youdontknow..
    @Youdontknow.. Před měsícem

    Guys pls Explain How it works
    I can't understand just made it but I wanna know how it works

  • @robinbyr976
    @robinbyr976 Před rokem

    now there is overlap the playr is going in th floor !
    how may i do

  • @tanyapropertimu8896
    @tanyapropertimu8896 Před rokem

    what if u hold IT

  • @rinkachi-rinkitata
    @rinkachi-rinkitata Před rokem

    Why does everyone use if touching colour?

  • @MikayeelAzeem
    @MikayeelAzeem Před 7 měsíci

    I will do this in my computer remember the 👍🏻 code

  • @rajibnath623
    @rajibnath623 Před 2 měsíci

    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

    • @Game_theory_fan
      @Game_theory_fan Před měsícem +1

      Blud use if touching level, and yes you do need that lil kid

  • @PONGZILE-gw9pz
    @PONGZILE-gw9pz Před rokem

    It work :O
    how you learn this? ITS AMAZING

  • @dafuqboom_mpg
    @dafuqboom_mpg Před rokem

    (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

  • @mrmelol
    @mrmelol Před rokem

    for me is not jumping is teleport up and than slowly down

  • @pepapig00
    @pepapig00 Před 8 měsíci

    But how do i tap "space" in mobile?

  • @Cleacat
    @Cleacat Před 5 měsíci

    You just jump 🏃

  • @numbnooz4070
    @numbnooz4070 Před rokem

    0:01

  • @jeromebourgeois9930
    @jeromebourgeois9930 Před 7 měsíci

    0:30

  • @MdBelal-qh3ij
    @MdBelal-qh3ij Před 8 měsíci +1

    😅😊,,scratch

  • @dav1855
    @dav1855 Před 10 měsíci

    0:00

  • @flipping7
    @flipping7 Před rokem +1

    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

    • @leejiaxiang48
      @leejiaxiang48 Před rokem

      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

  • @scratchcodingtutorial
    @scratchcodingtutorial  Před rokem +1

    Watch full tutorial here: czcams.com/video/RO8OE8jcIks/video.html

    • @LEO_CREW217
      @LEO_CREW217 Před 5 měsíci

      i dont need full i just neeed shorts because i wear shorts

  • @Angelic19889
    @Angelic19889 Před 10 měsíci

    Bro you can just take the forever and only if block

  • @BhargavVekhande
    @BhargavVekhande Před 4 měsíci

    I just wasted my time to remember it 😭😭😭

  • @Hyunjinss_skz
    @Hyunjinss_skz Před 8 měsíci

    Hocammm bo dakka siz bu oyunun di l seçimini türkce yaptiniz❤😂

  • @charoswonazarova
    @charoswonazarova Před 2 měsíci

    samandar

  • @skilzeee
    @skilzeee Před rokem

    Thanks every time I move jump don't work

  • @crant2574
    @crant2574 Před 15 dny

    Im jumping IN the ground