Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to use pen tool to create a line that changes size and length?
- maztergamer
-
Scratcher
23 posts
How to use pen tool to create a line that changes size and length?
How would I be able to create a line with one position for one end and another position for the other end. This is the script I have now but it looks very buggy and flashy:
is there a way to make this much smoother?
(link to project: https://scratch.mit.edu/projects/512467127/)
pen down
repeat until <<not <<mouse down?>>>>
go to x: (xpos) y: (ypos)
go to x: (xpos2) y: (ypos2)
wait (0.0001) secs
clear
end
is there a way to make this much smoother?
(link to project: https://scratch.mit.edu/projects/512467127/)
Last edited by maztergamer (April 7, 2021 19:28:21)
- Evanzap
-
Scratcher
100+ posts
How to use pen tool to create a line that changes size and length?
get rid of the wait thing
- maztergamer
-
Scratcher
23 posts
How to use pen tool to create a line that changes size and length?
get rid of the wait thingif i get rid of wait it just dissapears
- Evanzap
-
Scratcher
100+ posts
How to use pen tool to create a line that changes size and length?
let me go look inside your project and try to fix the issue.get rid of the wait thingif i get rid of wait it just dissapears
- natdilt
-
Scratcher
100+ posts
How to use pen tool to create a line that changes size and length?
I recommend: 2x2 square
Then just you the arrow keys to draw.
To delete, do this
pen down
when [ left] key pressed
change x by (-1)
when [ right] key pressed
change x by (1)
when [ up] key pressed
change y by (1)
when [ left] key pressed
change y by (-1)
Then just you the arrow keys to draw.
To delete, do this
when [ backspace] key pressed
clear
- Evanzap
-
Scratcher
100+ posts
How to use pen tool to create a line that changes size and length?
@maztergamer
I have fixed your issue, put the erase all block like this
I have fixed your issue, put the erase all block like this
pen down
repeat until <not <mouse down>
go to x: (mouse x) y: (mouse y)
clear
go to [Sprite1 v]
wait (0.0001) secs // get rid of this if you want it to be even smoother
end
Last edited by Evanzap (April 7, 2021 19:40:56)
- maztergamer
-
Scratcher
23 posts
How to use pen tool to create a line that changes size and length?
I recommend: 2x2 squareNot exactly looking for a squarepen downwhen [ left] key pressed
change x by (-1)when [ right] key pressed
change x by (1)when [ up] key pressed
change y by (1)when [ left] key pressed
change y by (-1)
Then just you the arrow keys to draw.
To delete, do thiswhen [ backspace] key pressed
clear
The difficulty I'm having is deleting the line and redrawing fast enough that it looks seamless
- maztergamer
-
Scratcher
23 posts
How to use pen tool to create a line that changes size and length?
@maztergamerthat works!
I have fixed your issue, put the erase all block like thispen down
repeat until <not <mouse down>
go to x: (mouse x) y: (mouse y)
clear
go to [Sprite1 v]
wait (0.0001) secs // get rid of this if you want it to be even smoother
end
thanks a lot
- Discussion Forums
- » Help with Scripts
-
» How to use pen tool to create a line that changes size and length?


