OsLocalTeleportAgent
From OpenSimulator
Line 7: | Line 7: | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
vector LandingPoint = <128,128,50>; // X,Y,Z landing point for avatar to arrive at | vector LandingPoint = <128,128,50>; // X,Y,Z landing point for avatar to arrive at | ||
+ | vector TPvel = <0,0,0>; | ||
vector LookAt = <1,1,0>; // which way they look at when arriving | vector LookAt = <1,1,0>; // which way they look at when arriving | ||
+ | integer TPoptions = 2; // face the provided LookAt | ||
// | // | ||
default | default | ||
Line 19: | Line 21: | ||
key avatar = llDetectedKey(0); | key avatar = llDetectedKey(0); | ||
llInstantMessage(avatar, "Teleporting you to : " + (string)LandingPoint); | llInstantMessage(avatar, "Teleporting you to : " + (string)LandingPoint); | ||
− | osLocalTeleportAgent(avatar, LandingPoint, | + | osLocalTeleportAgent(avatar, LandingPoint, TPvel, LookAt, TPoptions); |
} | } | ||
}</source> | }</source> |
Revision as of 17:08, 1 May 2019
void osLocalTeleportAgent(key agentID, vector newPosition, vector newVelocity, vector newLookat, integer optionFlags)
| |
Caution ! still experimental, subject to changes Teleports an avatar with uuid agentID to the specified newPosition within same region. - OptionFlags is a bit field: | |
Threat Level | None |
Permissions | see description |
Extra Delay | 0 seconds |
Example(s) | |
vector LandingPoint = <128,128,50>; // X,Y,Z landing point for avatar to arrive at vector TPvel = <0,0,0>; vector LookAt = <1,1,0>; // which way they look at when arriving integer TPoptions = 2; // face the provided LookAt // default { state_entry() { llWhisper(0, "OS Local Teleport Active"); } touch_start(integer num_detected) { key avatar = llDetectedKey(0); llInstantMessage(avatar, "Teleporting you to : " + (string)LandingPoint); osLocalTeleportAgent(avatar, LandingPoint, TPvel, LookAt, TPoptions); } } |