Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Teleporter with Access Notecard

Hiroku Kamachi
Registered User
Join date: 29 Jul 2007
Posts: 10
09-26-2007 15:21
I use a teleporting script, and I need to add a notecard to it so only the people in the notecard can use the teleporter. I was wondering if it is possible. I will put the script below.

CODE

//replace the three numbers in following line with the target coordinates
//teleport only works within the same sim (no crossing sim borders)
//max teleport distance around 300 meters
vector target=<119, 231, 44>;

vector offset;

default
{
on_rez(integer params)
{
llResetScript();
offset = (target- llGetPos()) * (ZERO_ROTATION / llGetRot());
llSitTarget(offset, ZERO_ROTATION);
}

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) { // somebody is sitting on me
llUnSit(llAvatarOnSitTarget()); // unsit him
}
}
}

touch_start(integer i)
{
llSay(0, "Please right-click and select Teleport");
}
}
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
09-26-2007 15:40
This thread discusses restricting access with a list but all the same points will apply to doing it with a notecard:

/54/14/212241/1.html
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum