Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

teleport script question

Anya Dmytryk
i <3 woxy!
Join date: 13 Jul 2005
Posts: 413
08-30-2005 10:54
i'll preface this by saying "i suck at scripting". and i have looked on the wiki for help on this, but haven't found it. ;)

ok, i got my standard teleport script, and was amazed i actually got it to work. only one problem. when someone teleports, they become invisible to other people that are already at that location. they become visible again if they change clothes, if they sit/stand, or if they teleport back to the starting place and then reteleport back to the destination (most of the time). is this a bug, or is there something i should do with the script?
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
08-30-2005 10:59
From: Anya Dmytryk
i'll preface this by saying "i suck at scripting". and i have looked on the wiki for help on this, but haven't found it. ;)

ok, i got my standard teleport script, and was amazed i actually got it to work. only one problem. when someone teleports, they become invisible to other people that are already at that location. they become visible again if they change clothes, if they sit/stand, or if they teleport back to the starting place and then reteleport back to the destination (most of the time). is this a bug, or is there something i should do with the script?


Sounds like you're trying to TP across a sim border or too far. Try to keep it under 300 meters.
Anya Dmytryk
i <3 woxy!
Join date: 13 Jul 2005
Posts: 413
08-30-2005 11:05
i am teleporting to a sky platform, but i made sure the distance is under 300m. and this is all on my land, so i'm not sure why i would be going across sim borders.
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
08-30-2005 11:10
From: Anya Dmytryk
i am teleporting to a sky platform, but i made sure the distance is under 300m. and this is all on my land, so i'm not sure why i would be going across sim borders.


Do you have the .5 second delay between the sit and the auto-stand?
Anya Dmytryk
i <3 woxy!
Join date: 13 Jul 2005
Posts: 413
08-30-2005 11:19
yep. this is the one i'm using. i believe it's one of the generic free ones that is passed around.

From: someone

// Based on a script by Hank Ramos
//
// Some modifications by Shack Dougall

vector targetPos = <234.584, 41.035, 59.5>; //The target location

reset()
{
vector target;

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

on_rez(integer startup_param)
{
reset();
}

changed(integer change)
{
llSleep(0.5);
if (llAvatarOnSitTarget() != NULL_KEY)
{
llUnSit(llAvatarOnSitTarget());
}
reset();
}
}


oh, and foolish, i was one of the lucky ones to see your rose dancefloor. that thing is amazing!
Pru Costello
Not My President
Join date: 5 Jun 2005
Posts: 25
08-30-2005 12:47
the target has to be relative to the object not the sim... have you done that?
Anya Dmytryk
i <3 woxy!
Join date: 13 Jul 2005
Posts: 413
08-30-2005 13:02
i think so. doesn't this statement convert the position relative to the sim to the position relative to the object?

target = (targetPos- llGetPos())
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
08-31-2005 07:46
Try this rather:
target = (targetPos- llGetPos()) / llGetRot();
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Anya Dmytryk
i <3 woxy!
Join date: 13 Jul 2005
Posts: 413
09-01-2005 04:48
thanks everyone for the suggestions. none seem to have worked, and i've heard from several other people that this is a bug. i'll just pretend i'm a super hero with powers of invisibility. ;)