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

#1 2011-07-28 15:09:36

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Drawing straight lines at an angle

I have noticed that doing this when using:

<pen down>
<set x to( 123
<set y to( 126

makes the line go directly left, then directly up (not a straight line)
or when using this:

<pen down>
<glide( 1 )secs to x sad  123 )y sad  126

that if I set the glide time too short then it doesn't complete the line, but too long and with the project I have in mind, then it would take ages for it to finish.

Slow (uses glide): http://scratch.mit.edu/projects/RUMCHEERYPOOPOO/1948944

Doesn't work at all (uses set x/y): http://scratch.mit.edu/projects/RUMCHEERYPOOPOO/1949084

Last edited by RUMCHEERYPOOPOO (2011-07-28 16:39:51)


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#2 2011-07-28 17:17:57

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: Drawing straight lines at an angle

Perhaps you should try using
[blocks]<go to x sad  123 )y sad  126[/blocks]
instead. ^^


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#3 2011-07-28 17:35:54

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: Drawing straight lines at an angle

MyRedNeptune wrote:

Perhaps you should try using
[blocks]<go to x sad  123 )y sad  126[/blocks]
instead. ^^

And it works! I never realised there was a difference, but I'll keep it in mind for the future that there is.


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#4 2011-07-28 17:40:25

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Drawing straight lines at an angle

What MRN said. If you use the two blocks it'll go to the X position and THEN to the Y, resulting in sort of an L shape. So using "go to x/y" will give you an angled line.

Edit: Oh, you confirmed it works  tongue

Last edited by hmnwilson (2011-07-28 17:41:06)


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

Board footer