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

#1 2007-09-06 20:05:12

pmzimmer
Scratcher
Registered: 2007-09-02
Posts: 5

i really need help

I want a sprite to follow a path like this: move 150 steps, turn counterclockwise 90 degrees, move 140 steps, turn counterclockwise 90 degrees, move 130 steps turn counterclockwise 90 degrees, etc,etc, all the way to 5 steps.  I want this done without typing all of those steps.  (And without typing every single coordinate: i.e. x and y coordinates)

Offline

 

#2 2007-09-06 20:24:59

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: i really need help

Sorry buddy, there are no shortcuts.

edit: Sorry I didn't see that you wanted it just to repeat 5 times. Kevin is right.

Last edited by archmage (2007-09-09 12:03:06)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2007-09-08 10:28:16

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: i really need help

archmage is wrong---that can be done with a loop:

set steps to 150
repeat until steps <5
     move <steps> steps
    turn left 90
    change <steps> by -10

Offline

 

#4 2007-09-09 04:23:36

Stewart123
Scratcher
Registered: 2007-08-20
Posts: 12

Re: i really need help

Meaning

<set{ steps  }to( 150
<repeat until>s<( steps <<>  5)>
<move( steps )steps>
<turn cw( 90 )degrees>
<change{ steps  }by( -10

<end>

I know it is

<turn cw( 90 )degrees>
but turn anticlockwise isn't working.

Last edited by Stewart123 (2007-09-09 04:27:24)

Offline

 

#5 2007-09-09 08:25:20

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: i really need help

Have a look at this project by MrShaw:

http://scratch.mit.edu/projects/MrShah/29484

Offline

 

Board footer