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

From AgentCubes
Jump to navigation Jump to search
imported>Mike
imported>Loon911
m
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[image:Move random action.png|200px]]
+
[[Image:Move random on action.png|200px|Move random on action.png]]  
  
<table cellpadding="10" cellspacing="0" border="0" width="100%">
+
[[Image:Move random on expanded.png|200px|Move random on expanded.png]]  
<tr>
 
<td align="left" valign="top" width="80"><b>Definition:</b></td>
 
<td align="left" valign="top" width="100%">The <strong>Change</strong> action changes the shape (look) of the agent in the cell indicated by the [[Direction parameter]] to the depiction displayed in the action's [[Shape parameter]]. The dot (.) refers to the agent itself, which should be the way Change should be used: changing yourself to have a different shape. The Change action is useful for creating animations or visually changing the state of an agent.
 
</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:Move random 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 '''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.''
 +
|-
 +
| align="left" valign="top" width="80" | '''Parameters:'''
 +
| align="left" valign="top" width="100%" | [[Depiction parameter|target agent]]: ''the class name of the Agent to move onto.
 +
|-
 +
| align="left" valign="top" width="80" | '''Additional Parameters:'''
 +
| align="left" valign="top" width="100%" |
 +
[[Animation parameter|animation]]: ''accelerated or constant speed''
 +
 
 +
[[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.