llTeleportAgent

From Second Life Wiki
Jump to navigation Jump to search
Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: llTeleportAgent( key avatar, string region, vector pos, vector look_at );
REQUEST Function ID
0.0 Forced Delay
10.0 Energy

Requests a teleport of avatar to location pos within region, turning the avatar to face the position given by look_at. Providing an empty string for region requests a local teleport, and is identical to explicitly providing the name of the current region.

• key avatar
• string region
• vector pos
• vector look_at

Caveats

  • This function sends requests to an agent's viewer, compatible with calls to llMapDestination() in unsupported viewers.
  • By default, viewers that permit automatic teleportation will do so if:
    • The scripted object is worn by the avatar being teleported.
    • The scripted object belongs to the land-owner of the parcel that the avatar is currently within, and the requested teleport is a local one.
  • Other requests, or all requests for viewers that have disabled automatic teleportation, will trigger a dialogue giving details of the teleport request.
  • This function is throttled at 10 requests per every 30 seconds by the simulator, and 1 per every 20 seconds in supported viewers.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>default {

   key teleportedAgent;
   touch_start(integer x) {
       llTeleportAgent(teleportedAgent = llDetectedKey(0), "", <128.0, 128.0, 25.0>, <129.0, 128.0, 25.0>);
       llSetTimerEvent(30.0);
   }
   timer() {
       // Is the teleported avatar still nearby?
       if (llVecDist(llGetPos(), llList2Vector(llGetObjectDetails(teleportedAgent, [OBJECT_POS]), 0)) > 10.0) {
           // Teleport request appears to have been accepted
       } else {
           // Teleport request appears to have been refused
       }
       llSetTimerEvent(0.0);
   }
}</lsl>

Notes

This would be extremely useful in complex builds such as Stargates, HUDS and other teleportation creations. NOTE: look_at is included to match llMapDestination's look_at possible future functionality, which currently does nothing.

  • See SVC-212 for the JIRA listing for this function.

Deep Notes

Search JIRA for related Issues

Signature

//function void llTeleportAgent( key avatar, string region, vector pos, vector look_at );