Difference between revisions of "Teleport-To Action"
imported>Mike |
imported>Mike |
||
Line 1: | Line 1: | ||
− | [[Image:Teleport to row.png|250px | + | [[Image:Teleport to row.png|250px]] |
− | [[Image:Teleport to expanded.png| | + | [[Image:Teleport to expanded.png|250px]] |
{| width="100%" cellspacing="0" cellpadding="10" border="0" | {| width="100%" cellspacing="0" cellpadding="10" border="0" |
Revision as of 21:18, 17 April 2012
Definition: | The teleport to action will move the agent to the specified row, column and layer. 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. |
Parameters: | row, column |
Additional Parameters: | layer, world, animation, 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; 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. |
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). |