Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Drawing game
- AwesomePiggy6
-
New Scratcher
9 posts
Drawing game
I am making a simple drawing game, and it took me a very long time to make a vertical color scale and make a code like this with 12 different colors:
when backdrop switches to [Backdrop2 v]It took forever to get that finished but it doesn't work!!! Maybe it is the fact that I put the codes in the pencil sprite. When I click on a color the pen color stays the same. Please help me!
if <<mouse down?> and <<touching color [#ff0088] ?> >> then
set pen color to [#ff0088]
Last edited by AwesomePiggy6 (Jan. 9, 2016 17:18:56)
- Sugar3070
-
Scratcher
52 posts
Drawing game
Share the project and I can most likely help you. You can also look at my drawing game I made not to long ago if you'd like.
https://scratch.mit.edu/projects/92361163/
https://scratch.mit.edu/projects/92361163/
- AwesomePiggy6
-
New Scratcher
9 posts
Drawing game
I've shared my game, go to the “Play a game” button and click on “Piggy drawing”
- footsocktoe
-
Scratcher
1000+ posts
Drawing game
Maybe this sentence will help…
There is not one “pen” for the entire project, there is a separate “pen” for each sprite.
So you have to create a pen sprite and make your color choices inside the script of that sprite. (Or else use a global variable for “pencolor” if you have to have separate sprites for pen and color choice. Set pencolor to the color (0-200) and then set the pen color to pencolor.)
Actually, the “pen” is just a single pixel (for size 1) being stamped onto the backdrop as it moves. (For size two it's 2 pixels wide, size 3 is 3 pixels wide, etc)
There is not one “pen” for the entire project, there is a separate “pen” for each sprite.
So you have to create a pen sprite and make your color choices inside the script of that sprite. (Or else use a global variable for “pencolor” if you have to have separate sprites for pen and color choice. Set pencolor to the color (0-200) and then set the pen color to pencolor.)
Actually, the “pen” is just a single pixel (for size 1) being stamped onto the backdrop as it moves. (For size two it's 2 pixels wide, size 3 is 3 pixels wide, etc)
- Discussion Forums
- » Help with Scripts
-
» Drawing game