See Condition

From AgentSheetsWiki

Revision as of 18:19, 20 April 2012 by Corrina (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Definition: The See condition:checks if the agent at the cell indicated by the Direction parameterlooks like the shape specified in the Shape parameter. The agent can check its own shape. 

directionthe direction to check for the target agent

shape: the specific agent depiction of the target agent

Optional Parameters: Layer parameter: the layer to check for the target agent
Example 1: same layer: If the Tree agent in the Forest Fire simulation is currently a burning tree (i.e. sees itself as a burning tree shape), with a 50% chance (the die out probability for the fire) changes itself to a burnt tree, incremetns the burnt tree count (the simulation property called "Burnt_Trees") and calculates the percentage of burnt trees in the forest. See Condition Example.png
Example 2: different layer:In its "remove above" method, if the Nebuchadnezzar agent in the 3D Matrix game sees a Matrix shame in the layer above it, it plays the Whip sound, removes the Matrix (erases the agent in the same x,y position, but the layer above it) and replaces it with a Hole agent.
See condition example 2.png
Personal tools