Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Fencing in a Turtle
From: "Alain Tougas" <alain@xxxxxxx>
Date: Mon, 14 Apr 2008 17:37:57 -0400

Hello,

Change:

to start
setpenuptext "pu
forever [setpos mousepos]
end

to this:

to start
setpenuptext "pu
forever [drive]
end

to drive
if and
  (abs first mousepos) < 100
  (abs last mousepos) < 100
    [setpos mousepos]
end




-----Original Message-----
From: mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
[mailto:mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Gail
Garthwait
Sent: Monday, April 14, 2008 5:08 PM
To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: Fencing in a Turtle


Thank you for sending the directions about how to draw with the turtle by
clicking and dragging the turtle!!   Now the student wants to know how to
keep the turtle from going too far.  I can't see any solution but I wondered
if anyone out there in
MW land can?

Gail
gail_garthwait@xxxxxxxxxxxxxx

==============If you try out the attached sample,
1) click the start/stop button and click on the turtle to show the ink
2) try sending the turtle to the very far left, or very far right, or way up
or down while he's drawing, and it makes a heck of a mess.

How can I keep my turtle from going too far in any direction, especially
when the turtle is being controlled by a user, without messing up the
program and its purpose?

If it's possible, I would like my turtle to stay in the following area:

-360 < xcor < +360
-200 < ycor < +200

Any ideas?




  • Previous by thread: Fencing in a Turtle
  • Next by thread: Looking for an old tutorial

  • 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.


    © copyright 2001 - 2008