Discuss Scratch

Xerolahero
Scratcher
3 posts

Hitboxes

how do i even put hit boxes on sprites( i know this has been discussed but i dont understand):):|:(:D:o;):/:P:lol::mad::rolleyes::cool:
squelz
Scratcher
100+ posts

Hitboxes

ok so u basically have a sprite, this sprite touches another sprite, sets the movement/speed to negative of a “speed” variable so that the sprite moves backwards

(im not too knowledgeable in this topic either but this is what i think happens)
Sammies123333
Scratcher
100+ posts

Hitboxes

Try something like this:

when green flag clicked
forever
check hitboxes
end

define check hitboxes
switch costume to [hitbox v]
if <touching [thing v] ?> then
what you put here depends on the type of game you're making
end
switch costume to [costume1 v]
atomicbryght
Scratcher
100+ posts

Hitboxes

Xerolahero wrote:

how do i even put hit boxes on sprites( i know this has been discussed but i dont understand):):|:(:D:o;):/:P:lol::mad::rolleyes::cool:
also not sure if you need this but to make a hitbox AROUND the sprite, i.e. it gets triggered just from being close to and not directly on the sprite, just make the sprite a vector layer and draw an invisible box around it
Sammies123333
Scratcher
100+ posts

Hitboxes

atomicbryght wrote:

Xerolahero wrote:

how do i even put hit boxes on sprites( i know this has been discussed but i dont understand):):|:(:D:o;):/:P:lol::mad::rolleyes::cool:
also not sure if you need this but to make a hitbox AROUND the sprite, i.e. it gets triggered just from being close to and not directly on the sprite, just make the sprite a vector layer and draw an invisible box around it
I don't think an invisible box works
atomicbryght
Scratcher
100+ posts

Hitboxes

Sammies123333 wrote:

atomicbryght wrote:

Xerolahero wrote:

how do i even put hit boxes on sprites( i know this has been discussed but i dont understand):):|:(:D:o;):/:P:lol::mad::rolleyes::cool:
also not sure if you need this but to make a hitbox AROUND the sprite, i.e. it gets triggered just from being close to and not directly on the sprite, just make the sprite a vector layer and draw an invisible box around it
I don't think an invisible box works
hmm, odd, i'm pretty sure it's worked for me before (though i was probably doing something different with it)
anyway then disregard my comment i am lowk not smart
EmperorChickadee
Scratcher
16 posts

Hitboxes

here's my advice.

For the main player sprite.
when green flag clicked
forever
go to [ hitbox]
end

Then, just make your normal code for collision and movement with the hitbox
And you can use the ghost effect to hide your hitbox
Xerolahero
Scratcher
3 posts

Hitboxes

@atomicbryght this is so helpful and works yay

————————————————————————
I love this i am gonna save this forever bro ty

Powered by DjangoBB