Difference between revisions of "New Action"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
imported>Andri
Line 19: Line 19:
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="100%">In the Frogger game, the Tunnel agent generates new Trucks to its right, once every 0.6 seconds, with a 25% chance, as long as there is road where it is supposed to create the new car (to avoid piling cars on top of each other).
 
<td align="left" valign="top" width="100%">In the Frogger game, the Tunnel agent generates new Trucks to its right, once every 0.6 seconds, with a 25% chance, as long as there is road where it is supposed to create the new car (to avoid piling cars on top of each other).
 +
 
[[Image:New action example.png|500px]]</td>
 
[[Image:New action example.png|500px]]</td>
 
</tr>
 
</tr>

Revision as of 23:38, 17 June 2011

New action.png

New action additional params.png

Definition: The New action generates a new agent in the cell indicated by the Direction parameter. The new agent has the shape selected in the action's Shape parameter.
Parameters: direction, shape
Additional Parameters: layer
Example: In the Frogger game, the Tunnel agent generates new Trucks to its right, once every 0.6 seconds, with a 25% chance, as long as there is road where it is supposed to create the new car (to avoid piling cars on top of each other). New action example.png