Teleport-To Action

From AgentSheetsWiki

(Difference between revisions)
Jump to: navigation, search
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 will move the agent to the specified row, column and layer.&nbsp; Also, the user may optionally specify a specifc world to teleport to, in this case, the agent will be removed from its current world, and will be displayed at the specified row, column and layer in whatever world has been specified.&nbsp; <br>
+
| 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]], [[Column parameter|column]]<br>
+
| 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]], [[World parameter|world]], [[Animation parameter|animation]], [[Animation time parameter|time]]: the '''teleport to''' action can move an agent in a layer other than the current layer the agent resides on; by default it teleports the agent inside the current world but it can also teleport the agent to other worlds in the same project;&nbsp; it 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.
+
| 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 17:40, 20 April 2012

Teleport to row.png

Teleport to expanded.png

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.

Teleport-example5.png

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.

Teleport-example3.png

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. 

Row-col-layer-print.png

In this print action we are print the agent's row column and layer (as seen in the status bar of the screenshot below). 

Example 2

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox