Discuss Scratch

scratch_this_
Scratcher
16 posts

HITBOX ONLY WORKS HALF THE TIME

https://scratch.mit.edu/projects/403544237/


Hi! I used professor blue's video on hitboxes (RPG series). However when clicking the green flag, somehow the hitbox only works half the time. So if it works now, click the flag again and it shouldn't work (vice versa). I don't know why this is, but you can see the hitbox detection and costume in the “boy” sprite in the last big chunk of code I think. Any help is greatly appreciated!

HOW THE HITBOX DOESN'T WORK: When approaching a wall sprite (rock or fence) from the bottom (walking up to it), 1/2 the time (if It happens once it will happen 100% of the time, until the green flag is clicked again, alternating) the player will go inside the rock/fence until a certain point.

IDEAS:
-it could have to do with layers

(The RPG only has movement, scrolling and "hitboxes so far)
LankyBox01
Scratcher
1000+ posts

HITBOX ONLY WORKS HALF THE TIME

https://scratch.mit.edu/projects/403818153/editor/
when green flag clicked
forever
go to front
end
scratch_this_
Scratcher
16 posts

HITBOX ONLY WORKS HALF THE TIME

LIFE SAVER! Thank you so much.

Powered by DjangoBB