Scratch | How to make Better Melee Combat

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • Let's Program in Scratch - In this Scratch tutorial, I show a trick to help make your melee combat feel and work better! It involves using a hitbox to help the object you are hitting detect a hit.
    Thanks for watching! Please hit the like button and subscribe for future Scratch tutorials!
    Click the link below to see more of my Scratch programming tutorials!
    • Scratch | How-To Tutor...
    This video is family friendly! Hostile and/or rude comments will not be tolerated!

Комментарии • 120

  • @oj2368
    @oj2368 2 года назад +48

    At 2:57 the punching bag be looking kinda sus…

    • @ShiftClickLearn
      @ShiftClickLearn  2 года назад +13

      This comment is gold! xD

    • @oj2368
      @oj2368 2 года назад +1

      @@ShiftClickLearn Thanks, I’m actually making a melee stealth game so this really helped!

    • @doisturtle
      @doisturtle 2 года назад +1

      Hahahahahahhahahahahahaahhahahahhahaah
      *sus*

    • @Chubb_Prodz.
      @Chubb_Prodz. 2 года назад

      @Joshua Esposa how have you managed to do this to me?

    • @TheChonkChubbles
      @TheChonkChubbles Год назад

      Rehehe

  • @Gl1tchTF2
    @Gl1tchTF2 3 года назад +18

    Kid ur tutorials r better than the scratch team ngl

    • @sidsosuper5386
      @sidsosuper5386 3 года назад +3

      True dat.

    • @ShiftClickLearn
      @ShiftClickLearn  3 года назад +3

      Thanks!

    • @Gl1tchTF2
      @Gl1tchTF2 3 года назад +1

      @@ShiftClickLearn np kid, keep it up

    • @lilylunamoonyt
      @lilylunamoonyt 5 месяцев назад

      Well, zinnea has some good tutorials tho, so I would say both sides have good tutorials

  • @WiFiLuke
    @WiFiLuke 4 года назад +11

    Also I just want to say, your video quality is insane, you deserve more subs.

  • @lightfear3824
    @lightfear3824 3 года назад +5

    Thank You it helped a lot and you are a good RUclipsr you deserve more sub

  • @Jeremiah_Nika
    @Jeremiah_Nika 3 года назад +3

    I’m being completely fr you 100% need more subs

  • @xf._08
    @xf._08 3 года назад +4

    How would you count the amount of punches on the punching bag?

    • @ShiftClickLearn
      @ShiftClickLearn  3 года назад +2

      Add an "if touching" and change a variable by 1 in it!

    • @xf._08
      @xf._08 3 года назад +1

      @@ShiftClickLearn thanks

  • @creatorthefights9876
    @creatorthefights9876 3 года назад +4

    THX

  • @WiFiLuke
    @WiFiLuke 4 года назад +2

    do you know what scratch is based on, progamming language-wise? is it javascript?
    Good tutorial!

    • @ShiftClickLearn
      @ShiftClickLearn  4 года назад +2

      Scratch 3.0 is written in HTML5 / JavaScript! Here is the link to the wiki page:
      en.scratch-wiki.info/wiki/Scratch_3.0
      Thanks for the question! :D

  • @christopherbrenon
    @christopherbrenon 5 месяцев назад +1

    I'm not sure if this is the best method but… when I want to use a weapon of some sort in my games I make the weapon/fist a separate sprite, it makes it easier for me to work with and is simpler to code. I just started scratching about a week ago though so I don't really know what I'm talking about lol.

  • @calmguitar8530
    @calmguitar8530 2 года назад +4

    3:25 Just compare this code to the code you have now, the improvement is insane!

    • @ShiftClickLearn
      @ShiftClickLearn  2 года назад +1

      Thank you! I hard coded stuff a lot lol!! ._.

  • @matchymajor1776
    @matchymajor1776 3 года назад +3

    Ahh yes this should work well

  • @darthvato24
    @darthvato24 3 года назад +2

    Give me a good reason why this didn't get you any subs, this is amazing!

  • @Gigi4u
    @Gigi4u 13 дней назад

    Right now have been trying to make a godzilla game were you destroy buildings.
    I am currently trying to program the attacks.
    Hope that that the video healps me.

  • @slothy2179
    @slothy2179 2 года назад +4

    how did you make the sprites?

  • @OddOwlwcue
    @OddOwlwcue Год назад +1

    Tip: Instead of using the ghost effect you can make the hit box square invisible in sprites by removing the outline, make sure you have selected the hit box for this part, then click on fill and use color select, a color select circle should appear, then instead of picking a color pick the background. This will make the hit box invisible but still detectable, this is great for other stuff but the ghost effect is better in most cases.

  • @bosstankproductions1304
    @bosstankproductions1304 3 года назад +2

    Making a starwars game thanks dude

    • @ShiftClickLearn
      @ShiftClickLearn  3 года назад +2

      :D Cool! Can't wait to see it when its done!

  • @averageterrariafan2215
    @averageterrariafan2215 3 года назад +2

    "Hitting hitbox" the floor is made out of floor

  • @feasing
    @feasing 3 года назад +2

    Man i love this channel but you may need to post more (maybe some more game tutorials) but ether way you get a sub!

  • @magneto42brickfilms25
    @magneto42brickfilms25 3 года назад +3

    noice

  • @ZerowiththeZ
    @ZerowiththeZ 3 месяца назад +1

    Hey how do u make a blocking code?

    • @Lyicrx-y1r
      @Lyicrx-y1r 24 дня назад

      That's what I'm finding. And yeah I already know how to make blocking I made it my self but it's trash

  • @garagemusicstudios
    @garagemusicstudios Год назад +1

    Very professional fr bro deserves subs

  • @DiegoWorlitz
    @DiegoWorlitz 2 года назад +1

    The "send message" and "broadcast message" saved my cs50 project buddy. You are awesome! Cheers from Brazil.

  • @RandoAintFake
    @RandoAintFake 3 года назад +1

    how can i make special moves in my game better you find out love :D

    • @ShiftClickLearn
      @ShiftClickLearn  3 года назад +2

      It would be similar code to the hitting in this video!

  • @sivertsivert607
    @sivertsivert607 2 года назад +1

    I know this was 2 years ago but is there a method of making combo attacks like if i hold the attck button longer it does more diffrent variety of ground attacks?

    • @ShiftClickLearn
      @ShiftClickLearn  2 года назад

      Yeah there is probably a way lol... I just don't know off the top of my head xD.

  • @THEBLACKBLOON
    @THEBLACKBLOON 9 месяцев назад +1

    How do you make a cooldown??

  • @numbnooz4070
    @numbnooz4070 Год назад +1

    Hi! I'm making a boss battle, and I added lives and whenever you touch the boss, you take damage. I'm just wondering if there is some way to hit the boss, without getting hit in return.

    • @debatebattle
      @debatebattle Год назад

      Make your hitbox damage the boss but the boss cant damage the hitbox but the body

    • @numbnooz4070
      @numbnooz4070 Год назад

      @@debatebattle Hi! I've currently figured that out from my friend telling me, and my question was posted a month ago, but thanks anyways!

  • @juliocesarcamilo5132
    @juliocesarcamilo5132 6 месяцев назад

    what id do is:
    when flag is clicked
    forever
    if _____ then
    fill the blank with a "____ and ____"
    fill those blanks with "touching *insert the name for the punching bag sprite*" and a ____ = ____ block
    then id fill those blanks with a sprite number variant and the number of the punching sprite!
    thats just the simplest solution to the problem and if you want a solution the "arm not touching and still triggers the punching" problem you can just...make scratch's arm bigger

  • @lisalpizar858
    @lisalpizar858 10 месяцев назад +1

    AMAZIN

  • @roninplayzandexperiments2327
    @roninplayzandexperiments2327 2 года назад +1

    Making a Ninja game out of scratch so yeah. thanks

  • @christopherbrenon
    @christopherbrenon 5 месяцев назад

    In the roguelike I'm working on right now, I set it so it would only register the sword touching the enemy if it was at the peak of the attack animation. Which I did by using the equal block (operator) with a costume number block in the first slot (looks) and then I wanted it to say equals 5 because that's how many frames the animation had. So in the second slot of the equals block I put 5.

  • @QQwentz
    @QQwentz 4 месяца назад

    Good tutorial, instead you can use the hit box to be the shape of the fist. So whenever you hit your target it will only detect the fist, this is so you can't hit far away with that big of a hitbox even though it wasn't tried. Keep up the good work dude!

  • @OddOwlwcue
    @OddOwlwcue Год назад

    Bro I have the same creeper plushie in the background, used to have the charged version of it as well, don’t know what happened to it!

  • @user-ie3yh2qv4h
    @user-ie3yh2qv4h 4 месяца назад

    Does anyone know how to make the hitbox follow u whenever ur facing right or left, mines stuck on one side

  • @goldenfang6837
    @goldenfang6837 3 года назад +1

    Hey, do you have a video in which you build the punching bag?

    • @goldenfang6837
      @goldenfang6837 3 года назад +1

      And do you know how to make it work if you're facing left?

    • @ShiftClickLearn
      @ShiftClickLearn  3 года назад +2

      Yes, you can make the punching bag work from both directions!
      Right here (5:51) is the code of the punching bag. Under the "if touching hitting hitbox", add an if else checking which direction the player is. If the direction is 90, the that means the player is facing right, so do the code shown at (5:51).
      Otherwise, if the direction of the player is -90, then do the same code but change the turn clockwise to turn counterclockwise. Then change the turn counterclockwise to turn clockwise.

  • @HuynhNhatTanStudio
    @HuynhNhatTanStudio Год назад

    Bro ur so good and young nice job

  • @tuanminhnguyen6782
    @tuanminhnguyen6782 3 года назад +2

    i cant draw

    • @ShiftClickLearn
      @ShiftClickLearn  3 года назад +2

      :(

    • @Altaccount-g8u
      @Altaccount-g8u 4 месяца назад

      Dw bro just make simple blocky people that's what I did and it works well

  • @Computer895
    @Computer895 4 месяца назад

    Thank you for helping me in a school project

  • @aa_1330
    @aa_1330 Год назад

    To control the animation you could put:
    | forever |
    | | | next costume |
    | | if < ( costume number) = ( 3 ) then
    | | | | |switch costume to ( idle_1 )
    | | | |_________________________________
    | |___________________________________|

  • @superepicbacon2550
    @superepicbacon2550 2 года назад +1

    i did it without he 'Hit' message

  • @sicamoli
    @sicamoli 2 года назад +1

    dat cat lookin’ cool 😎

  • @Kingsbeak
    @Kingsbeak 3 года назад +1

    How do you do hurtboxes

  • @aa_1330
    @aa_1330 Год назад

    You could only add one ( [ costume # ] of ( player )

  • @フォアシャドウ
    @フォアシャドウ 7 месяцев назад

    Make more scratch to tutorials

  • @Rudenoobpvps
    @Rudenoobpvps Год назад

    Dude this is so cool keep up the good work

  • @JojoJere
    @JojoJere 2 года назад

    No "Next Costume" Block 4 Punching Animation?!

  • @amiasmiljour1190
    @amiasmiljour1190 3 года назад +1

    😎cool cat😎

  • @superepicbacon2550
    @superepicbacon2550 2 года назад +1

    thx

  • @anilchaudhary5524
    @anilchaudhary5524 2 года назад +1

    You sould make one on ranged weapons!

    • @ShiftClickLearn
      @ShiftClickLearn  2 года назад

      Good idea

    • @anilchaudhary5524
      @anilchaudhary5524 2 года назад

      @@ShiftClickLearn Thanks!

    • @anilchaudhary5524
      @anilchaudhary5524 2 года назад

      @@ShiftClickLearn Suggested coz I am trying to make a shooter game with diffrent weapons!

    • @cyber_cds
      @cyber_cds 2 года назад

      Set to key to spawn clone. When start as clone, go to player then move in direction player is faced, move until touching level or enemy, then broadcast, then delete clone

  • @RichardFong-t1b
    @RichardFong-t1b 3 месяца назад

    Says that thing

  • @imhim.frfr.
    @imhim.frfr. 11 месяцев назад

    when i set the ghost effect, it just stops working could you fix that

  • @3rdstrikecreator
    @3rdstrikecreator Год назад

    THIS IS SO HELPFUL BRO!

  • @WreckRBLX
    @WreckRBLX 5 месяцев назад

    3:07 LOL

  • @arsenturdzeladze3030
    @arsenturdzeladze3030 2 года назад

    Very, very useful. I am very grateful.

  • @ZzigZaG00NIN
    @ZzigZaG00NIN Год назад

    Hotboxes
    Great video

  • @cyber_cds
    @cyber_cds 2 года назад +1

    I didnt realize people had trouble with this stuff. Could I grow as a tuber fixing simple problems?

    • @ShiftClickLearn
      @ShiftClickLearn  2 года назад +1

      I have no idea, there definitely is a market for beginner tutorials... but I can't tell you what will or won't grow *your* channel. :D

  • @inaayel922
    @inaayel922 2 года назад

    art please

    • @ShiftClickLearn
      @ShiftClickLearn  2 года назад

      I didn't share it

    • @inaayel922
      @inaayel922 2 года назад

      @@ShiftClickLearn can uplease share it i really need it for a game

  • @bumbljumbl4481
    @bumbljumbl4481 6 месяцев назад +1

    🤓

    • @40sulman
      @40sulman 6 месяцев назад

      Breh don't be mean