5

I want to find the patches which satisfy certain conditions, using the following command:

print patches with [ (closest-party = turtle 1) and (distance < 10)]

give this as the result: (agentset, 7 patches)

how do i find those 7 patches inside that agentset

Raj
  • 1,049
  • 3
  • 16
  • 30

1 Answers1

8

If myset is an agentset, then [self] of myset will be a list of the agents.

let myset patches with [ (closest-party = turtle 1) and (distance < 10)] print [self] of myset

But usually you can just work with myset. E.g.,

ask myset [print self]
Alan
  • 9,410
  • 15
  • 20