Difference between revisions of "New Action"
Jump to navigation
Jump to search
imported>Corrina |
imported>Corrina |
||
Line 5: | Line 5: | ||
{| cellpadding="10" cellspacing="0" border="0" width="100%" | {| cellpadding="10" cellspacing="0" border="0" width="100%" | ||
|- | |- | ||
− | | align="left" valign="top" width="80" | '''Definition:''' | + | | 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 the shape selected. | | align="left" valign="top" width="100%" | The '''New''' action: generates a new agent in the cell indicated with the shape selected. | ||
|- | |- | ||
− | | align="left" valign="top" width="80" | '''Parameters:''' | + | | align="left" valign="top" width="80" | '''Parameters:''' |
| align="left" valign="top" width="100%" | | | align="left" valign="top" width="100%" | | ||
− | [[Direction parameter|direction]]: ''specifies where to create a new agent.'' | + | [[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="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="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="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]] | | 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
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). |