Delayed-Message Action
Revision as of 22:29, 4 April 2012 by imported>Mike (Created page with "150px {| width="100%" cellspacing="0" cellpadding="10" border="0" |- | width="80" valign="top" align="left" | '''Definition:''' | width="100%" valign=...")
Definition: | The delayed-message action will trigger a message in this agent after a specified amount of time. |
Parameters: | direction |
Example 1: |
move on the same layer: In the Frogger game, the Truck agent moves to the right once every half a second, as long as there is road there (second rule in the behavior below).
|
Example 2: | move between layers: In the 3D Matrix game, in its "Lift" method, the Nebuchadnezzar agent moves to the layer above it if the shift and up arrow key are pressed together and if at that position in the layer above, there is a Hole agent (first rule). Similarly, it moves to the layer below it if the shift and down arrow key are pressed together and if at that position in the layer above, there is a Hole agent (second rule). |