Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Hitboxes
- Dancreatesgames
- Scratcher
36 posts
Hitboxes
I'm trying to make it so that when my character hits something from below he just goes back down but the character is a apple and the stem is ruining my script I need a hitbox so he does not clip into a block
- MineTurte
- Scratcher
500+ posts
Hitboxes
Actually I just made a hit box! You can use it if you'd like. I'm trying to make it so that when my character hits something from below he just goes back down but the character is a apple and the stem is ruining my script I need a hitbox so he does not clip into a block
Link: https://scratch.mit.edu/projects/987157021/
If you need help implementing it I can help with that as well!
Hope this helps!
Last edited by MineTurte (March 21, 2024 14:48:50)
(pronouns are she/her). Advanced Alpha Game Studios Manager. Our website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!
If you found this secret, say uwu
Signature gradients here
- SemiTruk
- Scratcher
17 posts
Hitboxes
To make a simple hitbox you can make a new sprite and make it the same as the apple (expect remove the stem). Then you can implement code to make the hitbox invisible, follow the apple, and send events for things like hitting something.
Something like:
and
Something like:
when green flag clicked
set [ ghost] effect to (100)
forever
go to [ *Insert Apple Name Here*]
end
and
when green flag clicked
forever
if <this thing happens> then
broadcast [ event or somethin]
end
end
“If at first you don't succeed, you fail.”
- Dancreatesgames
- Scratcher
36 posts
Hitboxes
Yeah I need help implementing itActually I just made a hit box! You can use it if you'd like. I'm trying to make it so that when my character hits something from below he just goes back down but the character is a apple and the stem is ruining my script I need a hitbox so he does not clip into a block
Link: https://scratch.mit.edu/projects/987157021/
If you need help implementing it I can help with that as well!
Hope this helps!
- MineTurte
- Scratcher
500+ posts
Hitboxes
Could you link your project then?Yeah I need help implementing itActually I just made a hit box! You can use it if you'd like. I'm trying to make it so that when my character hits something from below he just goes back down but the character is a apple and the stem is ruining my script I need a hitbox so he does not clip into a block
Link: https://scratch.mit.edu/projects/987157021/
If you need help implementing it I can help with that as well!
Hope this helps!
(pronouns are she/her). Advanced Alpha Game Studios Manager. Our website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!
If you found this secret, say uwu
Signature gradients here
- Dancreatesgames
- Scratcher
36 posts
Hitboxes
I'm not sure how that would work with my script To make a simple hitbox you can make a new sprite and make it the same as the apple (expect remove the stem). Then you can implement code to make the hitbox invisible, follow the apple, and send events for things like hitting something.
Something like:when green flag clicked
set [ ghost] effect to (100)
forever
go to [ *Insert Apple Name Here*]
end
andwhen green flag clicked
forever
if <this thing happens> then
broadcast [ event or somethin]
end
end
- Dancreatesgames
- Scratcher
36 posts
Hitboxes
Yeah sure scratch.mit.edu/projects/986382335/ I am working on it currently though so something else might be broken when you refreshCould you link your project then?Yeah I need help implementing itActually I just made a hit box! You can use it if you'd like. I'm trying to make it so that when my character hits something from below he just goes back down but the character is a apple and the stem is ruining my script I need a hitbox so he does not clip into a block
Link: https://scratch.mit.edu/projects/987157021/
If you need help implementing it I can help with that as well!
Hope this helps!
Last edited by Dancreatesgames (March 25, 2024 14:39:28)
- MineTurte
- Scratcher
500+ posts
Hitboxes
Do you mind if I just completely rework the player sprite? Just the code, not the costumes.Yeah sure scratch.mit.edu/projects/986382335/ I am working on it currently though so something else might be broken when you refreshCould you link your project then?Yeah I need help implementing itActually I just made a hit box! You can use it if you'd like. I'm trying to make it so that when my character hits something from below he just goes back down but the character is a apple and the stem is ruining my script I need a hitbox so he does not clip into a block
Link: https://scratch.mit.edu/projects/987157021/
If you need help implementing it I can help with that as well!
Hope this helps!
(pronouns are she/her). Advanced Alpha Game Studios Manager. Our website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!
If you found this secret, say uwu
Signature gradients here
- cookieclickerer33
- Scratcher
1000+ posts
Hitboxes
Make it switch to a costume that is in the shape of the hitbox you want when doing the touching detection, then swap back after
⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH
- Dancreatesgames
- Scratcher
36 posts
Hitboxes
No I think my sprites are fine the way they are but thanks for the offer thoughDo you mind if I just completely rework the player sprite? Just the code, not the costumes.Yeah sure scratch.mit.edu/projects/986382335/ I am working on it currently though so something else might be broken when you refreshCould you link your project then?Yeah I need help implementing itActually I just made a hit box! You can use it if you'd like. I'm trying to make it so that when my character hits something from below he just goes back down but the character is a apple and the stem is ruining my script I need a hitbox so he does not clip into a block
Link: https://scratch.mit.edu/projects/987157021/
If you need help implementing it I can help with that as well!
Hope this helps!
- Dancreatesgames
- Scratcher
36 posts
Hitboxes
Yeah that's exactly what I did but it breaks when I click run without screen refresh Make it switch to a costume that is in the shape of the hitbox you want when doing the touching detection, then swap back after
- Discussion Forums
- » Help with Scripts
- » Hitboxes