Alter an Agent in the Neighborhood

How do I find and alter an agent in my neighborhood?


The finding part of the problem can be solved with blocks that have to do with lists. The smell block returns a list of agents within the radius provided. First picks out one agent from that list.

To make the agent you've picked out change, or do something, you can use the list blocks in an ask agents block:

This code asks one of the agents in radius 5 to turn red.

Submitted by talaya on 13. March 2008 - 14:40