[MWForum]Help with Conditionals

Susan Einhorn mwforum@lists.mathcats.com
Tue, 18 May 2004 14:53:54 -0400


On May 18 at 10:41 am, Mw. Jackson wrote:


> I am in a real bind.  I have introduced the conditional "if" to my 8th
> grade class.  We have a BIG integration product due by Thursday for a
> Science/Tech Fair. The students are simulating their experience of
> testing the velocity of water using oranges in a river. The orange
> should stop either when it hits the rope or the girl shape.
>
> Okay, here is the problem.
>
> We wrote a procedure that that says
> If touching? "orange1 "t2 [stop announce [.486 m/s]]
>
> This is not working.  The turtle is not reacting to the command.  Any
> ideas?  I also tried using if colorunder = brown [stop announce [.486
> m/s]

Hi,

Here are some possible things to consider in addition to what Jeff has
mentioned:
*The process that runs the conditional "if"  must be running while the
turtle is moving so that the condition is constantly being tested. Use
forever or a button set to forever to make sure the process is running as
the turtle is moving.
* To stop the turtle, you could use "clickoff" if the turtle is running an
onclick instruction. Or you can use stopall in (or out of) the procedure.
That stops everything.
*Use the color number, not the color name with colorunder (eg, if colorunder
= 35 [announce [This color is brown] stopall]


Hope that helps,

Susan

LCSI