[Thread Prev] [Thread Next]
I did mine in EX. I wonder if this is something like Zehava had in
mind. Use the arrow keys to "steer."
It works pretty well, unless you aim directly for a wall! Then some
"interesting" things occur.
I would be interested in some more advanced users paring out the
inelegant features. There is much I need to learn.
Here is the code. I hatched 7 turtles and then ran the procedure called
everyone [home seth 90]
t1, fd 120
t2, fd 100
t3, fd 80
t4, fd 60
t5, fd 40
t6, fd 20
t1, seth 145
make "turn 0
make "step .2
make "mystep (distance "t1) - 20
fd :mystep check2
t3, fd :mystep check3
t4, fd :mystep check4
t5, fd :mystep check5
t6, fd :mystep check6
t7, fd :mystep check7
t1, fd :step rt :turn
make "key ascii readchar
if :key = 37 [make "turn -.3]
if :key = 39 [make "turn .3]
if :key = 38 [make "turn 0]
if :key = 40 [make make "turn 0 "step 0]
if (abs ycor) > 140 [seth 180 - heading fd 2]
if (abs xcor) > 250 [seth 360 - heading fd 2]
if 20 < distance "t1 [fd :mystep towards "t1]
if 20 < distance "t2 [fd :mystep towards "t2]
if 20 < distance "t3 [fd :mystep towards "t3]
if 20 < distance "t4 [fd :mystep towards "t4]
if 20 < distance "t5 [fd :mystep towards "t5]
if 20 < distance "t6 [fd :mystep towards "t6]
[mailto:mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Daniel
Sent: Thursday, May 11, 2006 11:45 AM
Subject: Re: turtle after turtle
On 11 May 2006 at 5:03, zehava wizman wrote:
> Hello Forum!
> here attached a project. The moving of the turtles is changes by
> using ascii keys.
> but when I pushed some key, and the direction is changed, I want the
> other turtles first reach the exact point that turtle T1 changed its
> direction' and then turn to the same direction.Its doesn't work so
> yet.( I saw in the forum similar project with FOLLOWLINE procedure but
> my needs are a little diffrent).
> thanks, Zehava Wizman
Here is my failed attempt.
Previous by thread:
MIA, Ask an Expert: Greatest Common Factor
Next by thread:
RE: Zehava's snake
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.