Xylo Quisling
Registered User
Join date: 1 Feb 2007
Posts: 146
|
03-28-2007 04:41
Hello people,
I've looked through the scripting library, but I can only find rather complicated teleport scripts. Can anyone tell me where I can find a simple teleport script? And/or a simple script with teleport through sit/standup function?
Help is much appreciated, thanks, Xylo
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-28-2007 04:58
From: Xylo Quisling Hello people,
I've looked through the scripting library, but I can only find rather complicated teleport scripts. Can anyone tell me where I can find a simple teleport script? And/or a simple script with teleport through sit/standup function?
Help is much appreciated, thanks, Xylo Several floating around this forum and in various places in world. try thsi one vector target = <100,200,300>; // SIM Coordinates string Description = "Click to go to someplace";
default { state_entry() { llSetSitText("Teleport"); llSetText(Description,<1,1,1>,1); rotation rot = llGetRot(); llSitTarget( (llGetPos() - target)/rot, ZERO_ROTATION / rot ); } changed(integer change) { if (change & CHANGED_LINK) { key av = llAvatarOnSitTarget(); if (av) { llSleep(0.5); llUnSit(av); } } } }
The target coordinate can be obtained by rezzing a prim where you want to land and reading its position. Be aware that a sit target has a limited distance, you cannot expect to go miles.
|
Xylo Quisling
Registered User
Join date: 1 Feb 2007
Posts: 146
|
03-28-2007 05:43
Alright, thanks very much, Ludd.
|
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
|
03-28-2007 09:24
From: Newgate Ludd Be aware that a sit target has a limited distance, you cannot expect to go miles. 300m in each direction (about 519m max distance, I think) FYI.
|
Zante Zapedzki
We need html on a prim!
Join date: 15 Feb 2007
Posts: 123
|
06-03-2007 07:15
Not sure why but it's not unsitting the av for me. I tried increasing the sleep time.
Edit : /sigh, nm. Script wasn't running and it was using an old sittarget ; p
It doesn't seem to work properly. It's teleporting me to the opposite side of the coordinates.
Edit : It's extremely fiddly. I'm tryin to create a teleport board with about 6 buttons on it and each one of them needs to be aligned differently. Very confusing.
|