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: askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: MIA, Ask an Expert: abs xcor ycor and heading
From: askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 20 Nov 2007 03:35:08 -0700 (MST)

This is an automatic message sent from the web form at:
http://mia.openworldlearning.org/mwforum.htm

from: David Burke <burkd1@xxxxxxxxx>
date: Tue Nov 20 03:35:08 2007
platform: Mac OS10
version: MicroWorlds Ex

I have a game where my students have to navigate a polygon 
maze to win.  I want to check if there turtle is within a 
specified distance of the target.  I want their xcor, ycor 
and heading to be within 0.25, or any other chosen 
precision.  I was trying to get the ABS command to work for 
this with no luck.  Here is what I was trying:

ifelse abs 150 - xcor < 0.25 [pr [yes]] [pr [no]]

and more detailed:

ifelse and abs 150 - xcor < 0.25 abs 200 - ycor < 0.25 heading = 0 [pr [yes]] 
[pr [no]]
 
I use both PC and Mac



  • Previous by thread: Yellow Brick Music
  • Next by thread: RE: MIA, Ask an Expert: abs xcor ycor and heading

  • 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