Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I change the hitbox on my character????
- LGN_Bandit
-
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.
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.
- LGN_Bandit
-
8 posts
How do I change the hitbox on my character????
.
Last edited by LGN_Bandit (Dec. 25, 2020 07:42:04)
- LGN_Bandit
-
8 posts
How do I change the hitbox on my character????
It's shared share the project
- CodingBaguette
-
500+ posts
How do I change the hitbox on my character????
Whats the project you shared called?It's shared share the project
- AryWiz
-
100+ posts
How do I change the hitbox on my character????
Just make the hitbox the body part. Cut off the hands from the enemy hitbox 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.
- AryWiz
-
100+ posts
How do I change the hitbox on my character????
But still leave the hands on the enemy spriteJust make the hitbox the body part. Cut off the hands from the enemy hitbox 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.
- hair444y
-
46 posts
How do I change the hitbox on my character????
@griffpatch_tutor shows how to have hitboxes in their platforming tutorial 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. here.
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.
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:
Last edited by hair444y (Dec. 26, 2020 12:49:02)
- Discussion Forums
- » Help with Scripts
-
» How do I change the hitbox on my character????