Discuss Scratch

LGN_Bandit
Scratcher
8 posts

How do I change the hitbox on my character????

I'm making a game where the enemy goes towards the player. If the enemy hits the player you lose a life. To add a bit of strategy I've made two walls.
But the Enemy keeps getting his tiny hands stuck on the wall. Then the player can shoot him but the enemy can't move because his hand is touching the wall. How to I change the hit box so its just the body which can get stuck on the wall.
SparshG
Scratcher
500+ posts

How do I change the hitbox on my character????

share the project
LGN_Bandit
Scratcher
8 posts

How do I change the hitbox on my character????

.

Last edited by LGN_Bandit (Dec. 25, 2020 07:42:04)

LGN_Bandit
Scratcher
8 posts

How do I change the hitbox on my character????

SparshG wrote:

share the project
It's shared
CodingBaguette
Scratcher
500+ posts

How do I change the hitbox on my character????

LGN_Bandit wrote:

SparshG wrote:

share the project
It's shared
Whats the project you shared called?
AryWiz
Scratcher
100+ posts

How do I change the hitbox on my character????

LGN_Bandit wrote:

I'm making a game where the enemy goes towards the player. If the enemy hits the player you lose a life. To add a bit of strategy I've made two walls.
But the Enemy keeps getting his tiny hands stuck on the wall. Then the player can shoot him but the enemy can't move because his hand is touching the wall. How to I change the hit box so its just the body which can get stuck on the wall.
Just make the hitbox the body part. Cut off the hands from the enemy hitbox
AryWiz
Scratcher
100+ posts

How do I change the hitbox on my character????

AryWiz wrote:

LGN_Bandit wrote:

I'm making a game where the enemy goes towards the player. If the enemy hits the player you lose a life. To add a bit of strategy I've made two walls.
But the Enemy keeps getting his tiny hands stuck on the wall. Then the player can shoot him but the enemy can't move because his hand is touching the wall. How to I change the hit box so its just the body which can get stuck on the wall.
Just make the hitbox the body part. Cut off the hands from the enemy hitbox
But still leave the hands on the enemy sprite
hair444y
Scratcher
46 posts

How do I change the hitbox on my character????

LGN_Bandit wrote:

I'm making a game where the enemy goes towards the player. If the enemy hits the player you lose a life. To add a bit of strategy I've made two walls.
But the Enemy keeps getting his tiny hands stuck on the wall. Then the player can shoot him but the enemy can't move because his hand is touching the wall. How to I change the hit box so its just the body which can get stuck on the wall.
@griffpatch_tutor shows how to have hitboxes in their platforming tutorial here.
It worked by having a custom block change to the costume of a box (called hotbox) and turning back to the original costume after checking whether the sprite was colliding with walls/floors. On top of that you needed to tick “Run without screen refresh” (when making the custom block).
For you it could look something like this:
defineCheckCollisionsswitchcostumetohitboxiftouchingWall #1?thenmove-5stepsswitchcostumeto7-ceilingofbigFleeLives/2Switch back to the normal costume

Last edited by hair444y (Dec. 26, 2020 12:49:02)

Powered by DjangoBB