Move-Random-On Action
Revision as of 10:47, 17 June 2019 by imported>Loon911
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: | targetagent: 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. |