Discuss Scratch

MoreC0d1ng_Dude
Scratcher
1 post

How to make hitboxes

Im making a game and i need a hitbox because the player sprite is quite large and will be hit by enemies easily, but i have absolutely no idea on how to make a hitbox script.
Scatch900
Scratcher
13 posts

How to make hitboxes

Try doing it by making a second sprite that is a basic shape, call it player hitbox, then make the actual detailed player sprite go to the hitbox forever, which will have all the movement code. This may involve some tinkering with the centre of the player costume so the player doesn't just walk through the ground. Then, you can put collision in the hitbox, or in enemies set the collision to the hitbox.

If you want more details, I'd be happy to help!
riverdolphin216
Scratcher
14 posts

How to make hitboxes

You may want to sprites. one which stores all your controls (Hitbox) and then another for the character and animations

Powered by DjangoBB