Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Short-range teleport problem

Alexandra Jericho
Registered User
Join date: 14 Nov 2006
Posts: 11
12-15-2006 13:57
After refering to the Elevator discussion, I treid to setup a short range teleporter to move between the 2nd and 1st floors in my house. I attached a script to a panels on the walls and the first floor one works great, but the one form the 2nd to the 1st floor sends me even higher up off the ground. (Even though I did reverse the subtraction in my script so it should be sending me down.) Along these lines, why can't I enter negative numbers in my vectors? I try it and keep getting syntax errors.
Here's the code for the 2nd to 1st floor panel:

vector target = <.4,1,3.5>; //Vector distance between origin and destination
default
{
state_entry()
{
llSetText("Click to go to the 1st floor",<1,1,1>,1);
llSitTarget((llGetPos()-target)/llGetRot(), ZERO_ROTATION/llGetRot());
// In the line above, I reversed the subtraction in the 1st to 2nd floor script and it works fine.
}
changed(integer change)
{
if (change & CHANGED_LINK)
{
key av = llAvatarOnSitTarget();
if (av)
{
llSleep(0.5);
llUnSit(av);
}
}
}
}
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
12-15-2006 14:04
I'm not online to check, but are you perhaps saying "-.4" instead of "-0.4"? That may not parse.

It's hard to spot syntax errors in the working version :)