Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Generic Teleporting

Brendan Ludd
Second Life Junkie
Join date: 1 Jul 2005
Posts: 36
11-21-2005 17:37
Question here from a newbie builder and even "newbier" scripter. I wanted to use a teleporter in my new house design to reach the second floor. So two questions ..

1.) When you teleport normally it takes you to a specific place, xyz destination. However in a prefab house, that destination always changes. How do you work that in? Can you have a tp, just send you +20 meters in the Z direction? Does that make sense?

2.) How can I locate a specific location? I know if you click build a create a prim you get a display that shows its XY and Z location. Is there some kind of item I could wear that would show me, my own XYZ location? Would be helpful for mapping out teleporters.

Thanks!

Brendan Ludd
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
11-21-2005 17:58
llSitTarget, should answer all your questions :)
_____________________
Brendan Ludd
Second Life Junkie
Join date: 1 Jul 2005
Posts: 36
11-21-2005 18:13
Wow .. thats alot of reading and testing I am gonna have to do. Can you use Live Help in SL to ask for scripting help? :)

Brendan
Phoenix Psaltery
Ninja Wizard
Join date: 25 Feb 2005
Posts: 2,599
11-21-2005 18:17
There are items you can wear that will display the coordinates of your present location. It's not necessary to script it yourself.

P2
_____________________
:cool:
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
11-21-2005 18:53
ez way to get xyz coords, set a box on the floor and edit it :)

if you can tear the house so its in 2 parts just fly around setting boxes with coords and script. (you could make phantom "holes" in the walls, just set them back when your done)

or ...

set a box on your first floor, add script with appropate xyz but add however many m above is the second floor (5.5m from fisrt to second floor+0.5 or whatever it takes to not stick in the floor=6m)

Write or remember the general coords of that prim (first floor) and right click and choose teleport, you should be on floor 2, make another box, add script and edit it with first floor coords but this time z axis - 0.5 or whatever, fiddle with z axis till your landings are smooth for that quality feel.

CODE

//replace the three numbers in following line with the targetcoordinates <X, Y, Z>
vector target=<13.308,221.755,47.379>;

vector offset;

default
{

state_entry()
{
offset = (target- llGetPos()) * (ZERO_ROTATION / llGetRot());
llSetSitText("Teleport");
llSitTarget(offset, ZERO_ROTATION);
}

changed(integer change)
{ // something changed
if (change & CHANGED_LINK)
{ // and it was a link change
llSleep(0.5); // llUnSit works better with this delay
if (llAvatarOnSitTarget() != NULL_KEY)
llUnSit(llAvatarOnSitTarget()); // unsit him
}
}
}

note: not my script, but found in the forums somewhere.
Wicc Cunningham
Registered User
Join date: 25 Jun 2004
Posts: 52
Re: Generic Teleporting
11-22-2005 06:39
I sell a teleporter that may do what you need. It can use either a definate coordinate location or teleport based on the number of meters you want to move on each axis. You can get it either at my store Chaska (221,36) or SL Exchange. Look for YATS Teleport Script v4.0. I do have builder and personal versions.
Brendan Ludd
Second Life Junkie
Join date: 1 Jul 2005
Posts: 36
11-22-2005 09:35
Wicc,

It looks good, I bought the personal one to test it out and I like it. I will have to save up to get the Professional one :) But thanks!!!

Brendan
Wicc Cunningham
Registered User
Join date: 25 Jun 2004
Posts: 52
11-23-2005 18:21
Glad to help. It's always nice to know that people appreciate my scripts. :)