Difference between revisions of "New Action"
Jump to navigation
Jump to search
imported>Andri |
imported>Andri |
||
Line 1: | Line 1: | ||
[[image:New action.png|200px]] | [[image:New action.png|200px]] | ||
+ | |||
+ | [[image:New action additional params.png|200px]] | ||
<table cellpadding="10" cellspacing="0" border="0" width="100%"> | <table cellpadding="10" cellspacing="0" border="0" width="100%"> | ||
Line 9: | Line 11: | ||
<td align="left" valign="top" width="80"><b>Parameters:</b></td> | <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> | <td align="left" valign="top" width="100%">[[Direction parameter|direction]], [[Shape parameter|shape]]</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td align="left" valign="top" width="80"><b>Additional Parameters:</b></td> | ||
+ | <td align="left" valign="top" width="100%">[[Formula parameter|layer]]</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<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%"> | + | <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
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). |