Discuss Scratch

00bomb2010
Scratcher
6 posts

Drawing multiple lines at once with pen.

How do I draw multiple lines at once. I figured out how to draw lines but not multiple. Here is the project; Your text to link here…
mstone326
Scratcher
1000+ posts

Drawing multiple lines at once with pen.

Remove the erase all blocks and you will see that both lines are drawn. The Erase all is not local to a single sprite, it is erasing everything in the project.

You'll need to workout when a pivot point moves, when to erase all and redraw the screen

EDIT
CHeck the Elbow left sprite. I record the oldx and oldy position and if they change I clear the screen and redraw the lines
https://scratch.mit.edu/projects/1001332160/

Last edited by mstone326 (April 15, 2024 15:20:33)

MrKingofScratch
Scratcher
100+ posts

Drawing multiple lines at once with pen.

move all of the drawing into one sprite, then do
when green flag clicked
forever
draw
end
define draw
//run without screen refresh so everything appears at once
clear//called erase all in 3.0
go to [shoulder right v]
pen down
go to [elbow right v]
pen up
go to [shoulder left v]
pen down
go to [elbow left v]
pen up
etc.
00bomb2010
Scratcher
6 posts

Drawing multiple lines at once with pen.

mstone326 wrote:

Remove the erase all blocks and you will see that both lines are drawn. The Erase all is not local to a single sprite, it is erasing everything in the project.

You'll need to workout when a pivot point moves, when to erase all and redraw the screen

EDIT
CHeck the Elbow left sprite. I record the oldx and oldy position and if they change I clear the screen and redraw the lines
https://scratch.mit.edu/projects/1001332160/
That helps a lot thank you so much! I am one step closer to finishing
00bomb2010
Scratcher
6 posts

Drawing multiple lines at once with pen.

I have a playable project thanks to mstone feel free to check it out

Powered by DjangoBB