Collision block


Description:

Constantly checks for collisions between agents. If a collision occurs, causes the collider to run the 1:Turtles code, and the collidee to run the 2:Turtles code. Which agent is the collidee and which is the collider depends on the block. For example, if a Turtle and Frog collide, the collision block with "Turtles" as the first port and "Frogs" as the second port will assume that the Turtle is the collider and the Frog is the collidee.

Arguments:

1:Turtles (commands): This is the code that the collider runs.

2:Turtles (commands): This is the code that the collidee runs. The label of this port determines which breed will be assumed to be collidee.

Examples:

sets the collider's color to brown and the collidee's color to red.