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);
}
}
}
}
