Discuss Scratch

unicornstartower89
Scratcher
100+ posts

Pen

How do I get my pen tool to work? I mean, I put the pen down block but when I try to draw it doesn't do anything. Please help!
Dezach
Scratcher
100+ posts

Pen

Can you show your project, because if you write the following code, it should work:

when green flag clicked
set pen color to [#cb9900]
set pen size to (1)
pen up
go to x: (0) y: (10)
pen down
change x by (10)
change y by (-20)
change x by (-20)
change y by (20)
change x by (10)
-ParadoxGames-
Scratcher
29 posts

Pen

Could you please share a project with your current pen script? That way, we can try to narrow down what the problem is.
unicornstartower89
Scratcher
100+ posts

Pen

Yes, I guess I can share a project with the code.(Maybe you can just view my script here) Btw when I try my code out it just makes super small dots.
I am trying to make my line where ever the mouse pointer goes. (also I couldn't find the set drag mode dragable block so I will just type it in which won't make it into a block)

when this sprite clicked
pen down
set drag mode dragable
set pen color to (answer)
Dezach
Scratcher
100+ posts

Pen

Did you set the pen size to your needs? If it is too small you can put it bigger using this block:
set pen size to (10)

Do you use the clear block?
Clears all that as been drawn. So it should never be in a forever loop like so:
when green flag clicked
forever
clear
end

Finally, do you move?
If you stay at a point the only drawing you will see is the pen dot.
You can use any of the motion blocks to move the pen and draw:
move () steps

go to x: () y: ()

go to [ v]

glide () secs to x: () y: ()

change x by ()

set x to ()

change y by ()

set y to ()

Hope it helps.

Last edited by Dezach (Jan. 23, 2021 17:07:48)

unicornstartower89
Scratcher
100+ posts

Pen

What I mean is that, well, I want the line to move where the mouse pointer goes but that helped a lot! Thanks!
awesome-llama
Scratcher
1000+ posts

Pen

unicornstartower89 wrote:

What I mean is that, well, I want the line to move where the mouse pointer goes but that helped a lot! Thanks!
Only sprites can draw pen. You can make it look like the mouse cursor is drawing by having a sprite constantly go to the mouse.
Rohan_Programing
Scratcher
2 posts

Pen

So do you want the pen to erase or just go along the mouse?

Last edited by Rohan_Programing (Jan. 23, 2021 06:04:36)

lsps170191
Scratcher
29 posts

Pen

unicornstartower89 wrote:

What I mean is that, well, I want the line to move where the mouse pointer goes but that helped a lot! Thanks!
Okay. Then you can make a sprite and it forever goes to the mouse pointer and then draw like this:
when green flag clicked
set pen color to (answer)
forever
go to [ mouse pointer]
pen down
end

Does it works now? If you really want a actual tutorial, ask me then!

Last edited by lsps170191 (Jan. 23, 2021 07:56:26)

unicornstartower89
Scratcher
100+ posts

Pen

Thanks! I tried the script and it works (I changed it up a bit)!
lsps170191
Scratcher
29 posts

Pen

unicornstartower89 wrote:

Thanks! I tried the script and it works (I changed it up a bit)!
No problem! Don't forget to give me some credit!

Powered by DjangoBB