Reputation: 45
I am trying to make a turtle at a specific point (with is another blue turtle) do something, namely become blessed. (which means it can reproduce).
I tried using at-point, but the point is the position of the blue turtles is random, so it is unknown.
So I tried something else, but that didn't work either.
ask food [ask n-of count ants-on food [set blessed true]]
I also tried this:
ask food [ask ants in-radius 1 [set blessed true]]
but then the all the turtles became blessed, when only one of them was it the radius.
Also
ask ants [if ants-on food [set blessed true]]
Did not work.
Does anyone have suggestions?
Upvotes: 0
Views: 66
Reputation: 17678
If you want all the ants (assuming ants is a turtles breed) on the same patch as the blue turtle to become blessed, do this:
ask turtles with [color = blue] [ ask ants-here [set blessed true] ]
If you want something else, please be more specific in your description.
Upvotes: 3