Difference between revisions of "Move-Random-On Action"

From AgentCubes
Jump to navigation Jump to search
imported>Corrina
imported>Loon911
m
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[image:Move random on action.png|200px]]
+
[[Image:Move random on action.png|200px|Move random on action.png]]  
  
[[image:Move random on expanded.png|200px]]
+
[[Image:Move random on expanded.png|200px|Move random on expanded.png]]  
  
<table cellpadding="10" cellspacing="0" border="0" width="100%">
+
{| cellpadding="10" cellspacing="0" border="0" width="100%"
<tr>
+
|-
<td align="left" valign="top" width="80"><b>Definition:</b></td>
+
| align="left" valign="top" width="80" | '''Definition:'''
<td align="left" valign="top" width="100%">The <strong>Move-Random-On Action:</strong> When conditions are satisfied, this action moves the subject agent randomly onto agents of type specified that are immediately adjacent. If there are no such specified agents immediately adjacent (that is, in the 8 adjacent places), nothing happens. If there is one specified agent, the subject agents moves onto it. If there is more than one specified agent, the subject agent randomly selects one specified agent and moves onto it.  
+
| align="left" valign="top" width="100%" | The '''Move-Random-On Action:''' ''Moves the subject agent randomly onto agents of type specified that are immediately adjacent. If there are no such agents, nothing happens. If there is one specified agent, the subject agent moves onto it. If more than one, the subject agent randomly selects one and moves onto it.''
</td>
+
|-
</tr>
+
| align="left" valign="top" width="80" | '''Parameters:'''
<tr>
+
| align="left" valign="top" width="100%" | [[Depiction parameter|target agent]]: ''the class name of the Agent to move onto.
<td align="left" valign="top" width="80"><b>Parameters:</b></td>
+
|-
<td align="left" valign="top" width="100%">[[Depiction parameter|target agent]]</td>
+
| align="left" valign="top" width="80" | '''Additional Parameters:'''
</tr>
+
| align="left" valign="top" width="100%" |
<tr>
+
[[Animation parameter|animation]]: ''accelerated or constant speed''
<td align="left" valign="top" width="80"><b>Additional Parameters:</b></td>
 
<td align="left" valign="top" width="100%">[[Animation parameter|animation]], [[Animation time parameter|time]]: the move random action can animate the movement with accelerated or constant speed; and it can make the movement happen instantly (if time is 0) or it can take any amount of time to perform the animation. The slider() option in the time parameter connects the animation time to the slider located above the world, next to the other world controls.</td>
 
</tr>
 
<tr>
 
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="100%">???WHICH EXAMPLE???
 
[[Image:Move random action example.png|500px]]</td>
 
</tr>
 
  
</table>
+
[[Animation time parameter|time]]: ''If time is 0, movement happens instantly, or the slider() option connects the animation time to the slider control located above the world.''
 +
 
 +
|-
 +
| align="left" valign="top" width="80" | '''Example:'''
 +
| align="left" valign="top" width="100%" | [https://agentcubesonline.com/Ristretto3D/public/Ristretto3D.html?nid=1332630&mode=edit AgentCubes move-random-on-a example]
 +
 
 +
In this example the lady bug agent is using move-random-on action and can only move on the red tile. However, the beaver is using the move-random-on-a action which allows the agent to move on all of the tiles shapes.
 +
|}
  
 
[[Category:AgentCubes_Actions]]
 
[[Category:AgentCubes_Actions]]

Latest revision as of 09:47, 28 June 2019

Move random on action.png

Move random on expanded.png

Definition: The Move-Random-On Action: Moves the subject agent randomly onto agents of type specified that are immediately adjacent. If there are no such agents, nothing happens. If there is one specified agent, the subject agent moves onto it. If more than one, the subject agent randomly selects one and moves onto it.
Parameters: target agent: the class name of the Agent to move onto.
Additional Parameters:

animation: accelerated or constant speed

time: If time is 0, movement happens instantly, or the slider() option connects the animation time to the slider control located above the world.

Example: AgentCubes move-random-on-a example

In this example the lady bug agent is using move-random-on action and can only move on the red tile. However, the beaver is using the move-random-on-a action which allows the agent to move on all of the tiles shapes.