[Thread Prev] [Thread Next]
Hello,
Simple. Look at how REMOVE works:
REMOVE "T1
REMOVE "T2
You can replace T1 or T2 by "current turtle". To do that, you use
"who", as in:
REMOVE WHO
Now when you use EVERYONE, as in
EVERYONE [DO_THIS]
you're really saying:
ASK "T1 [DO_THIS]
ASK "T2 [DO_THIS]
ASK "T3 [DO_THIS]
and so on, for all the turtles you have on the page.
Therefore, the correct syntax for what you want to do is:
EVERYONE [REMOVE WHO]
which will do:
ASK "T1 [REMOVE WHO] (or "remove yourself")
ASK "T2...
Careful with clone. I think the same technique will work (EVERYONE
[CLONE WHO]) but depending on the context: I've seen some complex
cases of turtles being cloned while cloning some more and this can
create quite a mess in process management.
AT
Le 07-11-23 à 15:12, askanexpert@xxxxxxxxxxxxxxxxxxxxxxxxxxxx a écrit :
This is an automatic message sent from the web form at:
http://mia.openworldlearning.org/howdoi.htm
from: Anonymous <mrscientistman@xxxxxxxxx>
date: Fri Nov 23 13:12:24 2007
platform: PC
version: MicroWorlds Ex
I am having trouble with the EVERYONE command. I have noticed that
things you can do to specific turtles, especially CLONE and REMOVE
cannot be done to EVERYONE . EVERYONE [REMOVE] does not work. Is
there any way to make the CLONE and REMOVE commands compatible with
EVERYONE?
Previous by thread:
MIA, Ask an Expert: everyone remove
Next by thread:
Basic Command Descriptions
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.
|