Discuss Scratch

funni_dot
Scratcher
6 posts

Hitbox won't work...

I've been working on a project for the last few days, and everything was going fine. I was working on the hitboxes. After a little while, I was finished with the left hitbox. So, for the right hitbox, I just copied the left hitbox, changed the positioning, and the variable. But when I tested it out, it didn't work. I know that the issue is that the right hitbox isn't detecting the wall, but I don't know why it doesn't. The code for both the left and right hitbox respectively is as follows:

whenclickedsetghosteffectto100setTouching Left WalltoFalseforevergotoPlayeriftouchingLevel?thensetTouching Left WalltoTrueelsesetTouching Left WalltoFalse

whenclickedsetghosteffectto100setTouching Right WalltoFalseforevergotoPlayeriftouchingLevel?thensetTouching Right WalltoTrueelsesetTouching Right WalltoFalse

I would show you some images, but when I came back to the project, none of the collision would work…
funni_dot
Scratcher
6 posts

Hitbox won't work...

british_rod wrote:

can you share your project?
sure! https://scratch.mit.edu/projects/961643568/
Grizzly_NightStalker
Scratcher
92 posts

Hitbox won't work...

I suggest you remix the project with only the left hitbox working for now and then share that project and I could assist you further. Because as of now it's hard to see what's going on if nothing's working.
funni_dot
Scratcher
6 posts

Hitbox won't work...

Grizzly_NightStalker wrote:

I suggest you remix the project with only the left hitbox working for now and then share that project and I could assist you further. Because as of now it's hard to see what's going on if nothing's working.

That project doesn't exist…
funni_dot
Scratcher
6 posts

Hitbox won't work...

Bug resolved: hitbox sprites weren't big enough.

still, thanks for your help!

Powered by DjangoBB