user397479
user397479

Reputation: 33

NetLogo programming questions: check agent color/have breeds pass through one another

Some basic programming questions in NetLogo:

Thank you.

Upvotes: 0

Views: 520

Answers (1)

Jose M Vidal
Jose M Vidal

Reputation: 9142

1)To check the color of a turtle/agent you can do:

let the-agent ...get the agent some way...
if ( [color] of the-agent = orange) [show "the agent is orange"]

2) I'm puzzled. Turtles in netlogo do not collide with each other, by default, they pass over each other. The only thing that can stop a turtle from going "forward" is the end of the grid. You must have written some code that makes them collide.

Upvotes: 1

Related Questions