Teleport-To Action

From AgentCubes
Jump to navigation Jump to search

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.

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.



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). 

Example 2