Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Teleport Ball

Ploy Vogel
Registered User
Join date: 27 Aug 2004
Posts: 133
12-30-2004 15:00
Here's what I have so far but I am getting an error. I want to set up two different TP areas, one for avies on the list and another for anyone else. The TP portion works fine but I am trying to get the conditional statement to work. The portion I added to the original TP script is in between the asterix, the rest of the code works.

Any help would be appreciated.

Thanks


key lastAVkey = NULL_KEY;
string fltText = "";

integer i;

float xAxis = 43.664;
float yAxis = 172.959;
float zAxis = 340.000;
****************************************************
float xxAxis = 43.664;
float yyAxis = 150.000;
float zzAxis = 200.000;

list AllowedList= ["Avie1","Avie2"];
integer check_admitted_list (string name)
{
if ( llListFindList(AllowedList, [name]) >= 0 )
{
vector dest = <xAxis,yAxis,zAxis>;
} else
{
vector dest = <xxAxis,yyAxis,ZZAxis>;
}
}
*****************************************************
default
{
state_entry()
{
llSetSitText("Teleport";);
llSetText(fltText, <1,1,1>, 1);
rotation curr = llGetRot();
curr.s = -curr.s;
vector dest2 = dest - llGetPos();
dest2 = dest2 * curr;
llSitTarget(dest2, <0,0,0,1> * curr);
}

touch_start(integer i)
{
llSay(0,"Right click me and chose 'Teleport'";);
}

changed(integer change)
{
key currentAVkey = llAvatarOnSitTarget();
if (currentAVkey != NULL_KEY && lastAVkey == NULL_KEY)
{
lastAVkey = currentAVkey;
if (!(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION))
llRequestPermissions(currentAVkey,PERMISSION_TRIGGER_ANIMATION);
llUnSit(currentAVkey);
llStopAnimation("sit";);
llResetScript();
}
}
}
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
12-30-2004 15:31
Check the script library for the Multi-User Lockable Door script:
/54/22/24116/1.html

You could adapt that to do what you need. Instead of unlocking the door for listed avs, your TP fuction is called.
Punklord Drago
Registered User
Join date: 8 Sep 2004
Posts: 22
12-30-2004 15:57
i have one, IM me in game that is when we can get on!!!