Discuss Scratch

Tanman399
Scratcher
42 posts

help with pen extension

I need help with the pen extension, I am working on a costume in my game where you can draw it yourself and it is mostly functional but if you swipe your mouse out of the hitbox of where you are supposed to be able to draw quick enough, you can draw outside of it, so I need help to either erase some parts of the pen but not all of it or I need to find a way to make it impossible to draw outside of the hitbox in the first place
here is the project if you would like to see the issue:
https://scratch.mit.edu/projects/1076034442/
just type “test” into the codes menu and then click the right arrow button to equip the costume
-sbossbattle_
Scratcher
100+ posts

help with pen extension

instead of using if/else in forever loops, use a single if statement and a wait until block like
if <condition> then
do stuff
wait until <not <condition>>
end

Last edited by -sbossbattle_ (April 10, 2025 03:48:40)

N8_D_GR8_1
Scratcher
1000+ posts

help with pen extension

Tanman399 wrote:

I need help with the pen extension, I am working on a costume in my game where you can draw it yourself and it is mostly functional but if you swipe your mouse out of the hitbox of where you are supposed to be able to draw quick enough, you can draw outside of it, so I need help to either erase some parts of the pen but not all of it or I need to find a way to make it impossible to draw outside of the hitbox in the first place
here is the project if you would like to see the issue:
https://scratch.mit.edu/projects/1076034442/
just type “test” into the codes menu and then click the right arrow button to equip the costume
In your pen sprite, replace this block:

go to [mouse pointer v]

with this:

if <<<(mouse x) > [-100]> and <(mouse x) < [100]>> and <<(mouse y) > [-100]> and <(mouse y) < [100]>>> then
go to [mouse pointer v]
end

Powered by DjangoBB