Discuss Scratch

Akash2543
Scratcher
12 posts

Shield, grabbing, and hitboxes

Hi there! Akash here.
Recently, I've been creating a Smash-Like Game. I have most of the basic moves down, except for 2 of the most important things: Shields and Grabs!
Can anyone please provide scripts that will create a constantly shrinking shield when c is pressed, and a grab when x is pressed? Also, I need help with fixing my hitboxes. So far, whenever you execute an attack, the dummy will take damage whenever the character is touching it, and not just the actual hammer. Can someone also provide help on these topics? Anything would be appreciated!

Character Test 0.7b

Sinaboo
Scratcher
100+ posts

Shield, grabbing, and hitboxes

So this might be a little late. For the shield you could use a variable for the amount of shield left and whenever c is being held down the variable is changing by a negative number and when c isn't being held down, the variable's increasing. When the variable reaches 0, the fighter gets stunned for a certain amount of time. For the shield shrinking you'd have to do something that compares the variable to the size of the shield sprite.

Now for grabs and hitboxes. For hitboxes if you just want it to be where he hammer damages the dummy, take and remove the damage script from the character and apply it to the hammer.

An example of shield

https://scratch.mit.edu/projects/253903596/

Powered by DjangoBB