Discuss Scratch

Penguin5664
Scratcher
100+ posts

How do I make a hitbox?

footsocktoe wrote:

If you need to use “touching” then set the Sprite to 99% ghosting instead of hiding it. It will still be invisible, but can detect touches.
I know this is pretty old, but as an contribution, 100% ghosting wont affect touching, so it will be able to detect when it collides.
SabiB
Scratcher
94 posts

How do I make a hitbox?

Have the player switch to the hitbox costume, do everything the hitbox needs to do, and then simply switch the costume to the original.

when green flag clicked
forever
switch costume to [Hitbox v]
InsertScriptHere
switch costume to [OriginalCostume v]
end

Last edited by SabiB (Sept. 26, 2018 00:13:14)

HoopsMagoo
Scratcher
17 posts

How do I make a hitbox?

You can do this:
when green flag clicked
set [ ghost] effect to (100)
forever

go to [ theplayer]end
deck26
Scratcher
1000+ posts

How do I make a hitbox?

HoopsMagoo wrote:

You can do this:
when green flag clicked
set [ ghost] effect to (100)
forever

go to [ theplayer]end
Please don't necropost.
StevenTheSquare
Scratcher
100+ posts

How do I make a hitbox?

usually what I do is I have certain colors on different parts of any given sprite- like hair color, shirt color, shoes color, and then left wall color, right wall color, ground color, and ceiling color, and use various different
<color [#d92639] is touching [#a3fe65] ?>
<touching [OtherSprite] ?>
<(distance to [OtherSprite]) < [SomeAmount]>
blocks to test what part of what is touching what else.
genjiXshimada
New Scratcher
2 posts

How do I make a hitbox?

I'm having an issue. I made the hitbox, did the script but when I double checked it, it seems to go slightly behind the sprite I wanted it to correspond. Any suggestions to fix it?
codeman1044
Scratcher
1000+ posts

How do I make a hitbox?

Please don't necropost or thread hijack. If you need help, then create your own topic.

Powered by DjangoBB