OsTeleportOwner

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Added some headlines)
 
(14 intermediate revisions by 7 users not shown)
Line 1: Line 1:
'''Syntax:'''
+
{{osslfunc
 
+
|threat_level=None
'''osTeleportOwner(string destinationTarget, vector position, vector lookAt)''' <br />
+
|permissions=${OSSL&#124;osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
'''osTeleportOwner(integer regionX, integer regionY, vector position, vector lookAt)''' <br />
+
|delay=5
'''osTeleportOwner(vector position, vector lookAt)'''
+
|additional_info=This function was added in 0.7.2-post-fixes
 
+
'''osTeleportOwner''' has a 0.5 second delay if the teleport is not allowed, or when the destination is to a location in the same region as the Agents current region.
'''Returns:'''
+
|function_syntax= osTeleportOwner(string regionName, vector position, vector lookat)<br />
 
+
osTeleportOwner(integer regionX, integer regionY, vector position, vector lookat)<br />
Nothing
+
osTeleportOwner(vector position, vector lookat)
 
+
|ossl_example=<source lang="lsl">
'''Threat level:'''
+
// Teleporting HUD script
 
+
None
+
 
+
'''Description:'''
+
 
+
Teleports the owner of the object containing the script to the specified location. The first variant is able to teleport to any addressable region, including [[hypergrid]] destinations. The second variant teleports to a region in the local grid; the region coordinates are specified as region cells (not as global coordinates based on meters). The third variant teleports within the current region.
+
 
+
These functions have a [[threat level]] of ''None''. Also see [[osTeleportAgent]].
+
 
+
These functions have been added to OpenSim with commit r/14355 on November 16, 2010.
+
 
+
'''Example:'''
+
<source lang="lsl">// Teleporting HUD script
+
 
// Put this script into a prim and attach it as a HUD
 
// Put this script into a prim and attach it as a HUD
  
Line 58: Line 45:
 
     }
 
     }
 
}</source>
 
}</source>
 +
|description=Teleports the owner of the object containing the script to the specified location.
 +
 +
The first variant is able to teleport to any addressable region, including [[hypergrid]] destinations.
 +
 +
The second variant teleports to a region in the local grid; the region coordinates are specified as region cells (not as global coordinates based on meters).
 +
 +
The third variant teleports within the current region.
 +
 +
These functions have been added to OpenSimulator with commit r/14355 on November 16, 2010.
 +
 +
See also  [[osTeleportAgent]].
 +
|
 +
}}

Latest revision as of 09:40, 15 September 2021

osTeleportOwner(string regionName, vector position, vector lookat)

osTeleportOwner(integer regionX, integer regionY, vector position, vector lookat)
osTeleportOwner(vector position, vector lookat)

Teleports the owner of the object containing the script to the specified location.

The first variant is able to teleport to any addressable region, including hypergrid destinations.

The second variant teleports to a region in the local grid; the region coordinates are specified as region cells (not as global coordinates based on meters).

The third variant teleports within the current region.

These functions have been added to OpenSimulator with commit r/14355 on November 16, 2010.

See also osTeleportAgent.

Threat Level None
Permissions ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 5 seconds
Example(s)
// Teleporting HUD script
// Put this script into a prim and attach it as a HUD
 
list Destinations = [ "Welcome Area",
    "hg.osgrid.org:80",
    "ucigrid00.nacs.uci.edu:8002:Gateway 3000",
    "ucigrid00.nacs.uci.edu:8002:Gateway 7000" ];
list RegionNames;
 
default {
    state_entry() {
        // Derive region names from destinations
        integer i;
        for (i = 0; i < llGetListLength(Destinations); ++i) {
            string destination = llList2String(Destinations, i);
            list parts = llParseString2List(destination, [":"], []);
            integer numParts = llGetListLength(parts);
            if (numParts > 2)       // Hypergrid address with region name
                RegionNames += [ llList2String(parts, 2) ];
            else if (numParts == 2) // Hypergrid address without region
                RegionNames += [ llList2String(parts, 0) ];
            else                    // Destination in the local grid
                RegionNames += destination;
        }
    }
    touch_start(integer number) {
        llListen(-1234, "", llGetOwner(), "");
        llDialog(llDetectedKey(0), "Choose a destination:", RegionNames, -1234);
    }
    listen(integer channel, string name, key id, string message) {
        integer index = llListFindList(RegionNames, [ message ]);
        string destination = llList2String(Destinations, index);
        llOwnerSay("Teleporting to " + destination);
        osTeleportOwner(destination, <128, 128, 20>, ZERO_VECTOR);
    }
}
Notes
This function was added in 0.7.2-post-fixes

osTeleportOwner has a 0.5 second delay if the teleport is not allowed, or when the destination is to a location in the same region as the Agents current region.

Personal tools
General
About This Wiki