vonHart
vonHart

Reputation: 21

NetLogo: "with" command with multiple criteria

I want to use the "with" command to select turtles that are matching two criteria, X and Y. I don't know how to include the second criteria (Y) into the first bracket.

It looks like this:

ask other turtles with [X = 1 and Y=1] [

The "and" command is probably not the way to go, just so you understand what I am trying to achieve.

Sorry if this is a stupid question, I just can't figure it out.

Upvotes: 2

Views: 3216

Answers (1)

cooperstandard
cooperstandard

Reputation: 91

that should work...

this code works:

ask patches with [pycor <= 1 and pxcor > 7] [ set pcolor 23]

sometimes netlogo has random compile issues, I'd try running it again or reopening your editor.

Upvotes: 4

Related Questions