needed: teleport script
|
Dax Mars
Registered User
Join date: 8 Feb 2004
Posts: 34
|
09-05-2004 18:37
I need a teleport script that simnplly when "touched" send the tougee to the cords set in the script. edit- moved from the scripting library. thanks 
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
09-07-2004 13:31
Not do-able, I don't think. The only method of teleporting short distances that I'm aware of is the Sit hack, but apparently LL is going to close that particular loophole at some point in the future.
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
09-07-2004 15:33
No, it's not going to close that hack.
Not only is it used all over the grid by now, they've threatened to reduce it to 10m in TWO major releases and have refrained from doing so after the community responds with a thread requesting they not close it. If that pattern holds, the SitTarget trick will continue to stay open.
Telling people not to use it because LL has threatened to close it is not a good idea, because LL hasn't depreciated the function, nor have they included llTeleport like they suggested they might.
Dax, contact me in world, gimme details, I'll help ya out.
_____________________
</sarcasm>
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
09-07-2004 17:29
I think this is more or less correct... // Silly simple 'teleport' script
vector gvTargetPos = < 0, 0, 0 > ; // The target position, in Global coordinates, goes here
default { state_entry() { vector relpos = gvTargetPos - llGetPos() ; // Convert to a relative position if( llVecMag( relpos ) > 300 ) // Is it more than 300m away? { llWhisper( 0, "Error: target position out of range (300m)." ) ; }
else { llSitTarget( relpos, ZERO_ROTATION ) ; llSitText( "Teleport!" ) ; } }
changed( integer changed ) // Something has changed! { if ( changed & CHANGED_LINK ) // CHANGED_LINK applies to link changes and sitting { key sitter = llAvatarOnSitTarget() ;
if ( sitter != NULL_KEY ) // Did someone sit on me? { llUnSit( sitter ) ; // Unsit them! } } } }
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
09-07-2004 20:54
That's a good basic start, but if the teleporter is rotated in any way, they'll end up at the wrong location.
_____________________
</sarcasm>
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
09-08-2004 00:59
What, really? It actually cares about the rotation of the scripted object? How annoying! Though I suppose it would since its an offset. Huh. I think I just broke my brain trying to figure out how to un-rotate things. I'm going to bed. 
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
09-08-2004 02:10
Hehehehe... I have the forumla for un-rotation.  It took me an hour or two to solve it, but I have it. I -had- to solve it for my drag 'n drop auto-configuring teleporter system (only effective up to 100m). I'll tell you it's definitely possible, but I'm not giving away the answer. Mostly because I'm jealous of my hard work, but also because I like being one of the few who can help out people who want really good teleporters.
_____________________
</sarcasm>
|
Cubey Terra
Aircraft Builder
Join date: 6 Sep 2003
Posts: 1,725
|
09-08-2004 07:22
If you're interested, I give away my teleporter at Abbotts Aerodrome. I handles being moved or rotated, and includes a funky retro-sci-fi teleport booth.
To find it, go to Abbotts, go to the east side of Level 2. On a shelf in the Flight Shop, there's a box with a teleporter in it. Right-click and "Buy" for zero dollars.
_____________________
C U B E Y · T E R R A planes · helicopters · blimps · balloons · skydiving · submarines Available at Abbotts Aerodrome and XstreetSL.com 
|
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
|
09-08-2004 07:30
Yeah you cant rotate it or else it will bork. The formula I use is simply to multiply the rotation by the relative position vector...
|
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
|
09-09-2004 11:35
since you're just using sit target for the teleporting, why not just use the standard methods for unrotating a root prim on a vehicle?
Get the rotation of the prim: llGetRot();
then invert/cancel the rotation of the prim:
rotation rot = llGetRot(); rotation inverse = rot; inverse.s=-inverse.s; rot*=inverse;
then put in rot for your rotation in the sit target. Or something like this anyway.
(edited for correctness)
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
09-09-2004 14:24
From: someone Originally posted by Siro Mfume since you're just using sit target for the teleporting, why not just use the standard methods for unrotating a root prim on a vehicle?
Get the rotation of the prim: llGetRot();
then invert/cancel the rotation of the prim:
rotation rot = llGetRot(); rotation inverse = rot; inverse.s=-inverse; rot*=inverse;
then put in rot for your rotation in the sit target. Or something like this anyway. you should use a smarter inverse equation; it's possible for the s componant to be zero. as x^2 + y^2 + z^2 + s^2 = 1
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
|
09-09-2004 19:29
well you can also do inverse.x = -inverse.x; inverse.y = -inverse.y; inverse.z = -inverse.z;
But hey, I learned all that off the Wiki, I'm not making it up on my own or anything...
|
Zac Bunderfeld
Registered User
Join date: 19 Mar 2004
Posts: 16
|
10-07-2004 18:23
My teleport script is the bomb. It was developed by me in my early days, made from a couple different open-source scripts, then was updated by Nerol Satyr and I over time. It's made to match the "Linking Books" from MYST games, is widly used on Telador Isle and yes, it plays the Linking sound when you Link (with a special, free attachment).
It can handle any rotation, any moving, anything of the sort. Contact me in-world if you want to buy one, it includes a nifty Book!
-Zac
|