Difference between revisions of "New Action"

From AgentCubes
Jump to navigation Jump to search
imported>Andri
imported>Corrina
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[image:New action.png|200px]]
+
[[Image:New action.png|150px|New action.png]]  
  
<table cellpadding="10" cellspacing="0" border="0" width="100%">
+
[[Image:New action additional params.png|150px|New action additional params.png]]  
<tr>
 
<td align="left" valign="top" width="80"><b>Definition:</b></td>
 
<td align="left" valign="top" width="100%">The <strong>New</strong> 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]].</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Parameters:</b></td>
 
<td align="left" valign="top" width="100%">[[Direction parameter|direction]], [[Shape parameter|shape]]</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="100%">???WHICH EXAMPLE???
 
[[Image:New action example.png|500px]]</td>
 
</tr>
 
  
</table>
+
{| cellpadding="10" cellspacing="0" border="0" width="100%"
 +
|-
 +
| align="left" valign="top" width="80" | '''Definition:'''
 +
| align="left" valign="top" width="100%" | The '''New''' action: generates a new agent in the cell indicated with&nbsp;the shape selected.
 +
|-
 +
| align="left" valign="top" width="80" | '''Parameters:'''
 +
| align="left" valign="top" width="100%" |
 +
[[Direction parameter|direction]]: ''specifies where to create a new agent.''
 +
 
 +
[[Class name parameter|shape]]: ''specifies the type of new agent.''
 +
 
 +
|-
 +
| align="left" valign="top" width="80" | '''Additional Parameters:'''
 +
| align="left" valign="top" width="100%" | [[Formula parameter|layer]]: ''specifies on which layer to put the new agent.''
 +
|-
 +
| align="left" valign="top" width="80" | '''Example:'''
 +
| 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|New action example.png]]
 +
|}
  
 
[[Category:AgentCubes_Actions]]
 
[[Category:AgentCubes_Actions]]

Latest revision as of 21:28, 20 April 2012

New action.png

New action additional params.png

Definition: The New action: generates a new agent in the cell indicated with the shape selected.
Parameters:

direction: specifies where to create a new agent.

shape: specifies the type of new agent.

Additional Parameters: layer: specifies on which layer to put the new agent.
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