llTeleportAgent

From Second Life Wiki
Jump to navigation Jump to search
KBwarning.png Warning: This function is still under development and is subject to change at any time.

Summary

Function: llTeleportAgent( key avatar, string landmark, vector position, vector look_at );

Requests a teleport of avatar to a landmark stored in the object's inventory. If no landmark is provided (an empty string), the avatar is teleported to the location position in the current region. In either case, the avatar is turned to face the position given by look_at in local coordinates.

• key avatar The key of the avatar for which to request a teleport.
• string landmark The name of a landmark in the object's inventory; landmarks may be used to teleport to any valid location in Second Life. This string may be left blank for teleporting within the same region.
• vector position The position within the local region to teleport the avatar to if no landmark was provided.
• vector look_at The position within the target region that the avatar should be turned to face upon arrival.

This call requires PERMISSION_TELEPORT, which must be requested with llRequestPermissions.

Caveats

All Issues ~ Search JIRA for related Bugs

Examples

Without a landmark in the object's inventory <lsl>key teleportee;

default {

   state_entry()
   {
       llSay(0, "Touch to teleport");
   }
   touch_start(integer total_num)
   {
       teleportee = llDetectedKey(0);
       llRequestPermissions(teleportee, PERMISSION_TELEPORT);
   }
   
   run_time_permissions(integer perm)
   {
       if(PERMISSION_TELEPORT & perm)
       {
           llTeleportAgent(teleportee, "", <13.0, 38.0, 23.5>, <13.0, 12.0, 23.5>);
       }
   }

} </lsl> With a landmark in the objects inventory <lsl> key teleportee;

default {

   state_entry()
   {
       llSay(0, "Touch to teleport");
   }
   touch_start(integer total_num)
   {
       teleportee = llDetectedKey(0);
       llRequestPermissions(teleportee, PERMISSION_TELEPORT);
   }
   
   run_time_permissions(integer perm)
   {
       if(PERMISSION_TELEPORT & perm)
       {
           llTeleportAgent(teleportee, "Experience Tools 1", <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>);
       }
   }

}

</lsl>

See Also

Deep Notes

Search JIRA for related Issues

Signature

function void llTeleportAgent( key avatar, string landmark, vector position, vector look_at );