TRY THIS 🔥 - Jump and GRAVITY in Scratch tutorial

Поділитися
Вставка
  • Опубліковано 24 лис 2024

КОМЕНТАРІ • 203

  • @Sethanon3000
    @Sethanon3000 Рік тому +147

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

  • @hoodedhero8781
    @hoodedhero8781 Рік тому +34

    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.

  • @Literally_Weird_Studios
    @Literally_Weird_Studios 10 місяців тому +7

    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

  • @gabriellebilo5320
    @gabriellebilo5320 7 місяців тому +10

    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!

  • @Demonstrong
    @Demonstrong Рік тому +8

    Thank you this realy helped

  • @jonahlp134
    @jonahlp134 Рік тому +2

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

  • @yogendrakumarsharma4922
    @yogendrakumarsharma4922 Рік тому +2

    Awesome tysm bro 🙂🙂

  • @NoobShadeCarls
    @NoobShadeCarls 7 місяців тому +3

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

  • @zaidenmckay8247
    @zaidenmckay8247 10 місяців тому

    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

  • @armybrain
    @armybrain Рік тому +12

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

  • @ManojKumar-n5x3j
    @ManojKumar-n5x3j Місяць тому

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

  • @is_it_teapotortpot
    @is_it_teapotortpot Рік тому +1

    tyyyyy!

  • @Lunar_Nyx69
    @Lunar_Nyx69 2 місяці тому

    This helped a lot thx

  • @CrossSkull67
    @CrossSkull67 5 місяців тому +1

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

  • @stubby2548
    @stubby2548 Рік тому

    Thank you for this tutorial

  • @muki1481
    @muki1481 Рік тому +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

  • @Chess_FunnyMoments
    @Chess_FunnyMoments 6 місяців тому +8

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

    • @Lamm404
      @Lamm404 5 місяців тому

      Like me!

    • @AirphorianFortniteYT
      @AirphorianFortniteYT 4 місяці тому +1

      What about that 5%

    • @5DPixel
      @5DPixel 3 місяці тому

      scratch isn’t coding lol try learn assembly, (i tried to but the most i could do was print hello world)

    • @ColdCorpOfficial
      @ColdCorpOfficial 3 дні тому

      @@5DPixel try learning luau(i made a call of duty game with it

  • @MataPlaysgames
    @MataPlaysgames Рік тому +1

    I LOVE CATTTY THE SCRATCHYYY

  • @Duck_man_tds
    @Duck_man_tds Рік тому +1

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

  • @omaramr3452
    @omaramr3452 Рік тому +1

    thank you soo much ty

  • @danishnuruddien8919
    @danishnuruddien8919 11 місяців тому

    Wow THIS VIDEO CHANGE MY LIFE!!

  • @Sadhanasriram-e8t
    @Sadhanasriram-e8t Місяць тому

    it is working thankyou very much

  • @GraysonWinslow-w7h
    @GraysonWinslow-w7h 7 місяців тому

    good job bud!

  • @ProGuy_56
    @ProGuy_56 2 місяці тому +1

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

  • @Platinum285
    @Platinum285 8 місяців тому

    woah it actually worked thx

  • @LaRRoEditz
    @LaRRoEditz Рік тому +10

    Brow the next griffpatch

    • @Skithy
      @Skithy Рік тому +2

      Bro isn’t the next griffpatch

    • @LaRRoEditz
      @LaRRoEditz Рік тому

      Bro learn how to take a joke 💀

    • @LEGENDARY_CHEDDAR
      @LEGENDARY_CHEDDAR Рік тому +2

      ​@@LaRRoEditzlearn how to spell💀

    • @JaxonPlayz69
      @JaxonPlayz69 9 місяців тому

      learn to make them. @@LaRRoEditz

    • @ErmWhatTheSigma12790
      @ErmWhatTheSigma12790 9 місяців тому

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

  • @victoriaokoye7437
    @victoriaokoye7437 Рік тому

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

  • @monz4
    @monz4 Рік тому

    Thx man ❤

  • @kbshukla4126
    @kbshukla4126 Рік тому

    Kon sa application se create kar rahe ho bhai

  • @Coolguy123-
    @Coolguy123- Рік тому +1

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

  • @israelisrael1597
    @israelisrael1597 Рік тому

    Thank you so much

  • @Ronin1178-1
    @Ronin1178-1 Рік тому

    I remember using it once best childhood ever

  • @Identity22
    @Identity22 10 місяців тому

    so useful

  • @wah_shee
    @wah_shee Рік тому

    thanks for telling some codes now i know what to do

  • @NirvanPrabhuPereira
    @NirvanPrabhuPereira Місяць тому

    Thanks

  • @mehmetaskn4222
    @mehmetaskn4222 Рік тому

    Thank you

  • @aisback156
    @aisback156 6 місяців тому

    PvzJosh2:wow great job!

  • @oCanalDasHistoriasBloxOficial
    @oCanalDasHistoriasBloxOficial Рік тому +1

    Cool

    • @Leo_Nihongo
      @Leo_Nihongo 10 місяців тому

      yyeeeeeeeeeahhhhhhh

  • @nerdydogerblx
    @nerdydogerblx Рік тому

    thanks now i can make the jumping mechanic in scratch

  • @dineshkumarrastogi4256
    @dineshkumarrastogi4256 Рік тому +1

    Good

  • @minecraft00069
    @minecraft00069 11 місяців тому

    tysm

  • @hershelcaytak5312
    @hershelcaytak5312 Рік тому

    love it

  • @whiteslimeproductions3574
    @whiteslimeproductions3574 Рік тому +1

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

  • @Trashywasnthere
    @Trashywasnthere Рік тому +2

    Totally gonna use this. Thank ya.

  • @Dogedude
    @Dogedude 11 місяців тому

    Thx

  • @muppek
    @muppek Рік тому +1

    😍😍😍😍

  • @wouldyouskibidi
    @wouldyouskibidi Рік тому

    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

  • @Yourcertifiedddlchazyriverfan
    @Yourcertifiedddlchazyriverfan Рік тому +2

    tysm I need this for my game

  • @AyoAbdulazeez-ly2cd
    @AyoAbdulazeez-ly2cd Рік тому

    Please where can I get the scratch app please

  • @namekit7460
    @namekit7460 Рік тому +3

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

  • @gacha_aby
    @gacha_aby Рік тому +3

    Coding in scratch is op

  • @PONGZILE-gw9pz
    @PONGZILE-gw9pz Рік тому

    It work :O
    how you learn this? ITS AMAZING

  • @MochiMichhr
    @MochiMichhr Рік тому

    thx

  • @Atomiclemonade5
    @Atomiclemonade5 Рік тому

    How does it work with right and left key

  • @scratchcodingtutorial
    @scratchcodingtutorial  Рік тому +1

    Watch full tutorial here: ua-cam.com/video/RO8OE8jcIks/v-deo.html

    • @Leo_Nihongo
      @Leo_Nihongo 10 місяців тому

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

  • @NguyenHa-wl4hk
    @NguyenHa-wl4hk Рік тому

    thank to tutorial

  • @louzehallam7093
    @louzehallam7093 8 місяців тому

    I Will Try This but Its Perfect

  • @Rono_footballeditz
    @Rono_footballeditz 9 місяців тому

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

  • @vikramsirur1830
    @vikramsirur1830 Рік тому

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

    • @cursory1
      @cursory1 11 місяців тому

      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!

  • @avrulixgaming11
    @avrulixgaming11 Рік тому +1

    tysm tysm tysm tysm tysm tysm tysm tysm tysm tysm

  • @Mdurham09
    @Mdurham09 Рік тому

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

  • @flipping7
    @flipping7 Рік тому +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 Рік тому

      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

  • @Poppy_vlogs11
    @Poppy_vlogs11 Рік тому +1

    There’s an easier way but this is still useful

  • @moonbun69.
    @moonbun69. Рік тому

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

  • @rajibnath623
    @rajibnath623 7 місяців тому

    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

    • @Teinascripts
      @Teinascripts 6 місяців тому +1

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

  • @pepapig00
    @pepapig00 Рік тому

    But how do i tap "space" in mobile?

  • @robinbyr976
    @robinbyr976 Рік тому

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

  • @RegularPerson123guy
    @RegularPerson123guy 11 місяців тому

    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

  • @rinkachi-rinkitata
    @rinkachi-rinkitata Рік тому

    Why does everyone use if touching colour?

  • @UrLocalMarshmallow
    @UrLocalMarshmallow Рік тому

    I can finally make my dinosaur game

  • @therealkingcaleb
    @therealkingcaleb Місяць тому

    I watched a 30 minute tutorial that did not work, but this 45 second one worked, which is ironic.

  • @FrozenTundra10
    @FrozenTundra10 9 місяців тому

    Thanka

  • @StrangeGameA
    @StrangeGameA 8 місяців тому

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

  • @Ridim227
    @Ridim227 2 місяці тому +1

    im scracth Marianguy

  • @priyankawadhwani
    @priyankawadhwani Рік тому +2

    Wow I did not know this thanks

  • @ArethaN.A
    @ArethaN.A Рік тому +5

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

    • @imakemymark2467
      @imakemymark2467 Рік тому +1

      Uh, maybe?

    • @imakemymark2467
      @imakemymark2467 Рік тому +1

      You could just do it differently

    • @ArethaN.A
      @ArethaN.A Рік тому

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

  • @tanyapropertimu8896
    @tanyapropertimu8896 Рік тому

    what if u hold IT

  • @Youdontknow..
    @Youdontknow.. 6 місяців тому

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

  • @Infinty_Gretno_Gang
    @Infinty_Gretno_Gang Рік тому +3

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

  • @cirkulx
    @cirkulx Рік тому

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

  • @joaovctr-q8n
    @joaovctr-q8n 6 місяців тому

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

  • @amyclaireandfriends
    @amyclaireandfriends 2 дні тому

    I used touching (ground) but thanks:D

  • @kirbboiii
    @kirbboiii Рік тому

    Yoinkity splikity

  • @ILikeTinyLittleFrogs
    @ILikeTinyLittleFrogs 7 місяців тому

    It pulls me back the beggining

  • @Ridim227
    @Ridim227 5 днів тому +1

    you name on scracth

  • @MdBelal-qh3ij
    @MdBelal-qh3ij Рік тому +1

    😅😊,,scratch

  • @diehardvn1
    @diehardvn1 Рік тому

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

  • @deycallmemilk
    @deycallmemilk 10 місяців тому +1

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

  • @lucilacoronel3367
    @lucilacoronel3367 6 місяців тому +1

    Griffpacht

  • @Hyunjinss_skz
    @Hyunjinss_skz Рік тому

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

  • @210jmo
    @210jmo 9 місяців тому

    Way more intense than left or right 😅

  • @Galaxifyed
    @Galaxifyed Рік тому

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

  • @skilzeee
    @skilzeee Рік тому

    Thanks every time I move jump don't work

  • @MdBelal-qh3ij
    @MdBelal-qh3ij Рік тому +1

    Scratchকোডবেরকরো

  • @Nafi_yft2202
    @Nafi_yft2202 6 місяців тому

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

  • @ruzinaakhter5386
    @ruzinaakhter5386 6 місяців тому

    Dude, my sprite is getting stuck in the ground, bruh

  • @zuuxgrb
    @zuuxgrb 5 місяців тому

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

  • @Baconboi261
    @Baconboi261 10 місяців тому

    It didn’t work I did the same thing and it don’t do anything

  • @CoolioGamingz2
    @CoolioGamingz2 4 місяці тому

    Griffpatch: ...

  • @chriscouncil9917
    @chriscouncil9917 Рік тому

    It doesn’t work😢

    • @scratchcodingtutorial
      @scratchcodingtutorial  Рік тому

      Hi! Send me please your project and I'll help you to fix it. It should work :)