Topic closed
ok
Offline
(link to fourms) dont work just paste the shortcut ike http://scratch.mit.edu/forums/viewforum.php?id=6
Offline
basically its made so you can draw in your game...
Offline
yeah, all the [blocks] <pen up> [/blocks] used for is to draw things or for other techiques in scratch.
Offline
It's a piece of script which is about drawing
Offline
Ahem chao_chaos is my other account and so is Kirby_loves_muse
Offline
The pen allows sprites to "draw" on the Stage. Each sprite can control whether or not its pen is leaving marks on the stage using the "pen up" or "pen down" commands. Also controllable are the pen size, hue, and brightness (as well as a specific color). Finally, "stamp" will make a mark of the sprite on the stage, like a stamp. This was one of the last functions I familiarized myself with in Scratch, but also one of my favorite. Here are some notable projects featuring the pen tool, and some of mine roll .
Paddle2See's Son Of String: God only knows where Paddle2See gets his inspiration, but the world is a better place for it. This project showcases Scratch's ability to redraw lines somewhat rapidly.
Jens' Clones: The first time I used the stamp tool, I could have sworn I had found a way to dynamically duplicate sprites. Jens makes good use of the stamp function in a similar way here.
Cyclone103's Quick Draw: Example of a technique where the pen continually draws and erases lines between moving points to create the illusion that the lines are moving.
Canthair's Full Raytracer: don't even try to figure this one out. I'm pretty sure that Canthiar is a robot; but is he a good robot or a Microsoft robot?
AddZero's Random 3D Sculpture: Another QuickDraw project, only with a lot of scary math.
S65's Ultra-Fast Raycaster: Draws a room really, really fast with some somewhat annoying music. Gotta love this one!
Chalkmarrow's Bamboo: A nice change from all the evil math in the preceeding projects. Fun to watch, too!
relyt12101's Paint Scratch Pro: Shows off basic drawing techniques.
Paddle2See's Fuzzy Paint: A very fuzzy, artistic paint program, in contrast with his Tech Paint, which is more precise and mathmatical.
My Orbit Draw: Ok, maybe not so famous, but it's fun to play with!
Offline
A pen is so that you can draw on the Stage without having to make complicated scripts. Simple really! Great topic for new users though.
Offline
For more advanced projects, you use the pen for most of the graphics, like in bionic battle. Check out my pen tank to see what I mean, the only sprite is actually a 3x3 dot.
Offline
Tantusar wrote:
How do you use the pen?
There's a "pen" mode available with each sprite in a project. When you turn on the sprite's pen with the Pen Down block, the sprite will leave a line behind it whereever it goes. You can turn the pen off by using the Pen Up block. Finally the Clear block will erase the pen lines of all sprites.
Offline
Rivendain wrote:
I made a very basic paint palette on one of my projects and when you click on the color it is supposed to change the pen color but it doesn't work! Help! Please.
![]()
Maybe you should do this:
<forever if><mouse down?>
<set pen color to( What ever the sprite pallete is.
Hope that helps!
Offline
Rivendain wrote:
I made a very basic paint palette on one of my projects and when you click on the color it is supposed to change the pen color but it doesn't work! Help! Please.
![]()
Okay, this is just a guess, but I have seen a LOT of paint projects and I suspect the problem is that you have a sprite (the painting sprite) that you have set to track the mouse position that you are using to make your paint marks. Now, when you try to click on another sprite (the color-selection sprite), you are actually clicking on your painting sprite so the color-selection sprite never sees the click.
Common solutions are as follows:
1. Make a small hole in the center of your painting sprite....that way when you click, you will actually be clicking in the hole and will click on the color-selection sprite below the painting sprite.
2. Offset the center of rotation of the painting sprite so that it actually lies outside the borders of the sprite. That way, the painting sprite will track beside the mouse but not on the mouse so that mouse clicks will not land on the painting sprite.
3. Restrict the motion of the painting sprite so that it does not follow the mouse into the area where the color-selection sprites are located. You can do this by putting some IF blocks in your Forever loop that sets up the mouse tracking.
I have a gallery with a lot of different paint projects if you want to peek and see how other people have done it
http://scratch.mit.edu/galleries/view/17444
Offline
The only way I know of to make ragdolls is to use pens to connect points. There is no other way that It will work. Search ragdoll and click on a project you find. When you look at the scripts, you'll see pen is the most important part. That's 1 use for pen. Another is to draw a health bar by drawing the lines. You can also use pen for sprite duplication. I always mess up with advanced duplication so I can't help with that.
Offline
AlanProjects wrote:
Hi! Just wondering What is "pen" and what do you use it for? Could anybody give a demonstration?
Well, I'm sure you are already acquainted with the motion section. Simplified, the pen just tracks where the sprite goes.
You then have a number of other things you can do with it, like size, colour, etc.
Here, it shows how the pen can be used to graph a mathematical formula:
Here is the script:
The result:
And an explanation:
1. The script starts when the space is pressed by the user.
2. The Stage is cleared of all penmarks.
3. The variable 'variable' is set to -100.
4. The variable 'out of bounds' is set to 0.
5. The pen is put down.
6. The pen colour is set to #FFFF00 (yellow).
7. 'Variable' is changed by 1.
8. The sprite sets its X position to variable. (on the first run, that is -99).
9. The sprite sets its Y position based on the formula Y=10*sin(Variable2/10).
10. Whether the sprite is touching the edge is evaluated.
11. If the above returns TRUE, 'out of bounds' is changed by 1.
12. Steps 7 through 11 are repeated an additional 199 times.
(Note that the pen is always down, so the sprites travel across the 200 pixels is recorded in the above graph)
13. Whether the variable 'out of bounds' is greater that 0 is evaluated.
14. If the above returns TRUE, a low 'C' note is played.
15. If the above returns FALSE, middle C is played.
16. The script then automatically stops.
Offline
to draw lines
Offline
Cool Lines
Offline
Bluestribute wrote:
Blipp25 wrote:
o dang it i screwed it up. any way how do you make a script to drw with the mouse?
Yes. In Scratch's pre-made sprites, go under things, than click drawing_pencil. Than edit it costume to a single dot, and voila, you have it!
You don't even need to edit it. My project "Rainbow Writing" uses the pencil itself.
Offline
Topic closed