Hi!
To make newly hatched turtles perform commands, just follow the hatch
command with a command block:
ask turtles
[ hatch 1
[ command-for-the-new-turtles
]
]
(also, i'm sure you didn't mean to include LOOP in your ASK
commands... LOOP creates an infinte loop -- generally, you would only
use LOOP with something inside that contains STOP, to break out of the
loop. Also, generally, you would never use LOOP if you could avoid it,
and most times, you are better off using ASK, REPEAT, WHILE, FOREACH,
or a list traversal reporter like MAP, FILTER, SORT or REDUCE.)
~~James
http://www.turtlezero.com
On 8/3/07, cooldia00 < no_reply%40yahoogroups.com">no_reply
yahoogroups.com> wrote:
> Here's some code:
>
> ask turtles[
> loop[
> [do-stuff]
>
> [hatch more turtles]
> ]
> ]
>
> I'd like that the turtles being hatched within this loop "do-stuff" as
> well. At the moment, they are hatched and remain idle. I realize that
> they need to be "asked" to "do-stuff". How can I do that while
> remaining in the loop and not affecting the behavior of the other
> turtles already "doing stuff"
>
> Thanks!
.