This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-07-07 09:38:37

Twilight-Tak
Scratcher
Registered: 2010-05-15
Posts: 100+

I have a problem.

I am making an OS, and the 'Draw' function isn't working properly.
When clicked, it hides, then follows the mouse pointer, drawing red lines behind it. When I clicked the X button, It would still follow the mouse, even when it is able to be seen, and would still draw! I'm all out of ideas to fix the script, but maybe someone else has a drawing script that coul help me.


http://tripatlas.com/images/articles/hauntedcanadabanffdress.jpg The Windowless Hotel Episode Two!

Offline

 

#2 2010-07-07 10:38:00

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: I have a problem.

Try making a variable call "drawing" (or something similar), and when you open the drawing program, set it to 1. When you click the X, set the variable to 0. Then enclose your sprite's drawing scripts in Forever if [drawing = 1].

Does that make sense? Tell me if it works!

Last edited by Harakou (2010-07-07 19:42:57)


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2010-07-07 12:44:21

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: I have a problem.

Use the "Pen Up" and "Pen Down" blocks  smile

Offline

 

#4 2010-07-07 19:33:56

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: I have a problem.

I've noticed that sometimes when I draw in pen size 1 and not in presentation mode, the lines look broken and messed up but if I go into presentation mode, they look perfect.


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#5 2010-07-07 19:50:23

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: I have a problem.

Locomule wrote:

I've noticed that sometimes when I draw in pen size 1 and not in presentation mode, the lines look broken and messed up but if I go into presentation mode, they look perfect.

Maybe it has something to do with how many pixels can be displayed in the preview window?  If it can't display all the pixels in the project, it would have to compress the image, resulting in loss of pixel detail and those broken lines. Same as with decreasing a sprite's size with the "Set Size to [ ]" block.

Part of the reason I suspect this is because I'm not noticing that on my computer, so it might be related to the screen's resolution.

Correct me if I'm wrong.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#6 2010-07-07 20:17:01

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: I have a problem.

I am fairly certain that theproblem is that the pen is still down when you are clicking the "x" button...

But from what others have said it seems that that is not te issue.

Offline

 

#7 2010-07-07 20:55:21

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: I have a problem.

coolstuff wrote:

I am fairly certain that theproblem is that the pen is still down when you are clicking the "x" button...

But from what others have said it seems that that is not te issue.

Now that I think about it, just putting the pen up works fine and is probably a lot easier. My idea was that not having the pen object's scripts function at all if not needed would reduce lag.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer