Pages: 1
Topic closed
Hey guys, I am making a project for my friend Cody, and it involves drawing with a pencil. I know how to get the pencil to move where the mouse is, I just don't know how to get it to draw when I click the mouse. Please help ASAP, I am seeing him on the weekend =]
Offline
Look at this project
[blocks]
Or:
<when green flag clicked>
<forever>
<if> <mouse down?>
<pen down>
<else>
<pen up>
<end>
<go to[ mouse pointer ]>
<end>
[/blocks]
Happy scripting!
Offline
Cheers for that =]
One thing: I have buttons on the side to change colour, and one up top to clear the drawing, that one works if you click Stop then click it, but that doesnt work for the colour buttons. the script for the colour one is: (it's sprite two)
<when[ Sprite 2 ]clicked>
<set pen color to( red )>
Offline
JaredxD wrote:
Cheers for that =]
One thing: I have buttons on the side to change colour, and one up top to clear the drawing, that one works if you click Stop then click it, but that doesnt work for the colour buttons. the script for the colour one is: (it's sprite two)
<when[ Sprite 2 ]clicked>
<set pen color to( red )>
That should work...
Offline
What your script is doing is setting the pen color for the pen associated with the button sprite. You want to change the color of the pen on the pencil sprite. Each sprite has it's own pen and they can all be different color.
Probably the simplest approach is to use a Broadcast from the button sprite to the pencil sprite to tell it to set it's color.
Offline
Topic closed
Pages: 1