From OpenSimulator

Revision as of 13:41, 1 May 2019 by Ubit (Talk | contribs)

Jump to: navigation, search
void osLocalTeleportAgent(key agent, vector position, vector newVelocity, vector newLookat, integer flags)
Teleports an agent to the specified location within same region.

For osLocalTeleportAgent() to work, the owner of the prim containing the script must also be owner of the parcel where the avatar is currently on. The Avatar must have rights to enter the target position. If this isn't the case then the function fails silently. Flags is a bit field:
bit 0 (mask 1): use newVelocity / keep current
bit 1: use newLookAt / keep current lookAt

Threat Level Severe
Permissions ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Delay 5 seconds
string Destination = "LBSA Plaza"; // your target destination here (SEE NEXT LINES) Can Be
vector LandingPoint = <128,128,50>; // X,Y,Z landing point for avatar to arrive at
vector LookAt = <1,1,1>; // which way they look at when arriving
  on_rez(integer start_param)
  changed(integer change) // something changed, take action
    if(change & CHANGED_OWNER)
    else if (change & 256) // that bit is set during a region restart
    llWhisper(0, "OS Teleportal Active");
  touch_start(integer num_detected) 
    key avatar = llDetectedKey(0);
    llInstantMessage(avatar, "Teleporting you to : "+Destination);
    osTeleportAgent(avatar, Destination, LandingPoint, LookAt); 
Personal tools
About This Wiki