1

So in this project a obstacle is created with:

  set obstacle patches with [ abs(pxcor) < 15 and abs(pycor) < 15 ]
  crt 1 [ set size 30 set shape "square" set color gray set heading 0 ]

Now I want to distribute my patches around the obstacle, but I can't figure out how to place them anywhere but on the obstacle. So I'm looking for something like (but this gives a syntax error):

 move-to one-of patches with [ patch not obstacle and not any? turtles-here ]
Boris
  • 63
  • 4

1 Answers1

2

try this move-to one-of patches with [ not member? self obstacle and not any? turtles-here ]. You are already telling NetLogo you want to test the patches by specifying patches with, you don't need to repeat that for the obstacle test.

JenB
  • 17,620
  • 2
  • 17
  • 45
  • Unfortunately this results in: "NOT expected input to be a TRUE/FALSE but got the agentset (agentset, 841 patches) instead." – Boris May 01 '18 at 10:41
  • Sorry, I misunderstood how you create the obstacle - I had thought it was a patch attribute but it's actually a patch-set. Have edited my answer. – JenB May 01 '18 at 12:11