Difference between revisions of "Teleport-To Action"
imported>Mike |
imported>Corrina |
||
Line 1: | Line 1: | ||
− | [[Image:Teleport to row.png|250px]] | + | [[Image:Teleport to row.png|250px|Teleport to row.png]] |
− | [[Image:Teleport to expanded.png|250px]] | + | [[Image:Teleport to expanded.png|250px|Teleport to expanded.png]] |
{| width="100%" cellspacing="0" cellpadding="10" border="0" | {| width="100%" cellspacing="0" cellpadding="10" border="0" | ||
|- | |- | ||
| width="80" valign="top" align="left" | '''Definition:''' | | width="80" valign="top" align="left" | '''Definition:''' | ||
− | | width="100%" valign="top" align="left" | The '''teleport to''' action | + | | width="100%" valign="top" align="left" | The '''teleport to''' action: moves the agent to the specified row, column and layer in the world specified at the specified time.<br> |
|- | |- | ||
| width="80" valign="top" align="left" | '''Parameters:''' | | width="80" valign="top" align="left" | '''Parameters:''' | ||
− | | width="100%" valign="top" align="left" | [[Row parameter|row]] | + | | width="100%" valign="top" align="left" | |
+ | [[Row parameter|row]]: ''the row where the agent will be placed'' | ||
+ | |||
+ | [[Column parameter|column]]: ''the column where the agent will be placed'' | ||
+ | |||
|- | |- | ||
| width="80" valign="top" align="left" | '''Additional Parameters:''' | | width="80" valign="top" align="left" | '''Additional Parameters:''' | ||
− | | width="100%" valign="top" align="left" | [[Layer parameter|layer]] | + | | width="100%" valign="top" align="left" | |
+ | [[Layer parameter|layer]]: ''layer to place the agent'' | ||
+ | |||
+ | [[World parameter|world]]: ''world in which to place the agent'' | ||
+ | |||
+ | [[Animation parameter|animation]]:''constant or accelerated speed of animation'' | ||
+ | |||
+ | [[Animation time parameter|time]]: ''the slider() option in the time parameter connects the animation time to the slider located above the world'' | ||
+ | |||
|- | |- | ||
| width="80" valign="top" align="left" | '''Example 1:''' | | width="80" valign="top" align="left" | '''Example 1:''' |
Revision as of 00:40, 21 April 2012
Definition: | The teleport to action: moves the agent to the specified row, column and layer in the world specified at the specified time. |
Parameters: |
row: the row where the agent will be placed column: the column where the agent will be placed |
Additional Parameters: |
layer: layer to place the agent world: world in which to place the agent animation:constant or accelerated speed of animation time: the slider() option in the time parameter connects the animation time to the slider located above the world |
Example 1: |
teleport in the Current World: This agent is programmed to teleport to row 0 column 0 and layer 7 of its Current World it is stacked above a teleporter agent. |
Example 2: |
teleport to another world: This agent is programmed to teleport to row 1 column 1 and layer 0 in level2 when the agent is stacked above the goal agent. When the agent moves onto the goal it will be teleported to level2 with all of its attributes in tact and it will be removed from its current world. This is useful for transitions between different levels our world sections. |
Hint: |
Inside the print and say actions you may use ~self.row, ~self.column and ~self.layer to print an agent's row column and layer. Trying selecting an agent and making a print action such as the one shown below and pressing the test button. In this print action we are print the agent's row column and layer (as seen in the status bar of the screenshot below). |