[MWForum]Selecting a turtle randomly from a list
mwforum@lists.mathcats.com
mwforum@lists.mathcats.com
Wed, 06 Aug 2003 02:07:14 -0400
Is there a way to use PICK to select a turtle name from its list, then plug this into a variable, and then tell this particular turtle to clickon? (This, from my boys who want to write procedures to randomly activate turtles to fall at random intervals with random speeds. We've conquered the second two randoms; it's just the first that has us boggled.)
This doesn't work at all, but here's the idea:
make "thisturtle pick [turtle1 turtle2 turtle3 turtle4 turtle5]
:thisturtle, clickon
I feel quite certain that I'm making this concept much more difficult than it really is.
By the way, our earlier glitch with the duplicated turtles across pages was solved when we discovered that the WHEN-TOUCHING code stopped (entirely on its own) when we went to a new page. And to think that I'd spent a week drilling in the fact that asking MicroWorlds WHEN was to be done once and only once! When we called this procedure (of WHENs) again after arriving at the second page, the game continued okay. Is this really the way it works? I'm still quite surprised.
Thanks--
Lisa Richter
Lisa@CosmicThinkers.com