Navigation Bar AgentSheets Education R&D Support About Us Manuals Tutorial Movies FAQ Books Classes

Stacked A Condition

Definition: The Stacked A condition checks if the agent's location in relation to an agent specified of type class matches the adjacency choice; that is, the condition checks whether the agent is immediately above, somewhere above, immediately below, somewhere below, or above or below an agent of type specified by class.

If the agent is adjacent to the chosen depiction as specified with the adjacency parameter, the condition is true. Otherwise, the condition is false.

The difference between the Stacked and the Stacked-A conditions is that the Stacked condition checks for a specific depiction/look and is true only if the agent has that exact depiction, whereas Stacked-A checks for any depiction of the given agent and is true regardless of how the agent looks.

Parameters: adjacency, class
Example: The Frog agent in the Frogger game checks to see if it is stacked immediately on above a tunnel, no matter what the tunnel looks like, in which case it gives a message that walking over the tunnel to cross the road is not permitted (it's cheating!), erases the Frog, and stops the simulation. The same happens when the user tries to navigate the Frog on top of a Log Maker.


reference manual | ©2010 AgentSheets, Inc. | contact us