Next-to Condition

From AgentCubes
Revision as of 17:45, 17 June 2011 by imported>Andri
Jump to navigation Jump to search

Next to condition.png

Definition: The Next-to condition checks to see how many of the 8 adjacent neighbors in the same layer have a certain shape. If the agent is next to the right number of the specified shapes, the condition is true. Otherwise, the condition is false.
Parameters: comparator, formula, shape
Example: The Person agent in the Virus Attack project checks if it is next to one or more sick Person agents. If so, it has a 5% chance of acquiring the virus. Next to condition example.png