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!
At 2:57 the punching bag be looking kinda sus…
This comment is gold! xD
@@ShiftClickLearn Thanks, I’m actually making a melee stealth game so this really helped!
Hahahahahahhahahahahahaahhahahahhahaah
*sus*
@Joshua Esposa how have you managed to do this to me?
Rehehe
Kid ur tutorials r better than the scratch team ngl
True dat.
Thanks!
@@ShiftClickLearn np kid, keep it up
Well, zinnea has some good tutorials tho, so I would say both sides have good tutorials
Also I just want to say, your video quality is insane, you deserve more subs.
Thanks! Means a lot to me! :)
Thank You it helped a lot and you are a good RUclipsr you deserve more sub
Thanks!
I’m being completely fr you 100% need more subs
:D Thank you!
I agree
How would you count the amount of punches on the punching bag?
Add an "if touching" and change a variable by 1 in it!
@@ShiftClickLearn thanks
THX
You are welcome!
do you know what scratch is based on, progamming language-wise? is it javascript?
Good tutorial!
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
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.
3:25 Just compare this code to the code you have now, the improvement is insane!
Thank you! I hard coded stuff a lot lol!! ._.
Ahh yes this should work well
Awesome!!
Give me a good reason why this didn't get you any subs, this is amazing!
:D
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.
how did you make the sprites?
I made them in Scratch
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.
Making a starwars game thanks dude
:D Cool! Can't wait to see it when its done!
"Hitting hitbox" the floor is made out of floor
:D
Man i love this channel but you may need to post more (maybe some more game tutorials) but ether way you get a sub!
Thank you!
noice
:D
Hey how do u make a blocking code?
That's what I'm finding. And yeah I already know how to make blocking I made it my self but it's trash
Very professional fr bro deserves subs
The "send message" and "broadcast message" saved my cs50 project buddy. You are awesome! Cheers from Brazil.
Thanks! Glad I could help!
how can i make special moves in my game better you find out love :D
It would be similar code to the hitting in this video!
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?
Yeah there is probably a way lol... I just don't know off the top of my head xD.
How do you make a cooldown??
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.
Make your hitbox damage the boss but the boss cant damage the hitbox but the body
@@debatebattle Hi! I've currently figured that out from my friend telling me, and my question was posted a month ago, but thanks anyways!
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
AMAZIN
Making a Ninja game out of scratch so yeah. thanks
Have fun!
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.
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!
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!
Does anyone know how to make the hitbox follow u whenever ur facing right or left, mines stuck on one side
Hey, do you have a video in which you build the punching bag?
And do you know how to make it work if you're facing left?
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.
Bro ur so good and young nice job
i cant draw
:(
Dw bro just make simple blocky people that's what I did and it works well
Thank you for helping me in a school project
To control the animation you could put:
| forever |
| | | next costume |
| | if < ( costume number) = ( 3 ) then
| | | | |switch costume to ( idle_1 )
| | | |_________________________________
| |___________________________________|
i did it without he 'Hit' message
Nice!
dat cat lookin’ cool 😎
Thank you! 😎
@@ShiftClickLearn how to get the cat art
How do you do hurtboxes
Probably pretty similar to hitboxes!
You could only add one ( [ costume # ] of ( player )
Make more scratch to tutorials
Dude this is so cool keep up the good work
No "Next Costume" Block 4 Punching Animation?!
Yup
😎cool cat😎
Yup.
thx
You're welcome!
You sould make one on ranged weapons!
Good idea
@@ShiftClickLearn Thanks!
@@ShiftClickLearn Suggested coz I am trying to make a shooter game with diffrent weapons!
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
Says that thing
when i set the ghost effect, it just stops working could you fix that
NEVERMIND
THIS IS SO HELPFUL BRO!
3:07 LOL
Very, very useful. I am very grateful.
That's awesome! I'm glad it's useful!
Hotboxes
Great video
Hitboxes*
I didnt realize people had trouble with this stuff. Could I grow as a tuber fixing simple problems?
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
art please
I didn't share it
@@ShiftClickLearn can uplease share it i really need it for a game
🤓
Breh don't be mean