spacer.png, 0 kB
EASY LONG DISTANCE TELEPORTER E-mail

easytp.jpgThis teleporter is to teleport to one location.
just set the destination in the object description and touch 2ce to reset.

description like: < 120,34,28 >

texture the object the way you like.

 

 

 

 




vector gTargetPos;

string gSitText="Teleport";

integer myChannel = 123;
list objectD;
string locationN;
string gTargetPos1;
integer ii = 0;


vector gStartPos;

key gAvatarID=NULL_KEY;

integer gReturnToStartPos=TRUE;


warpPos( vector destpos)
{
integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1;

if (jumps > 100 )
jumps = 100;
list rules = [ PRIM_POSITION, destpos ];
integer count = 1;
while ( ( count = count << 1 ) < jumps)
rules = (rules=[]) + rules + rules;
llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) );
}

default
{
state_entry()
{
objectD = llGetObjectDetails(llGetKey(), [OBJECT_DESC,OBJECT_NAME] );
gTargetPos1 = llList2String(objectD,0);
gTargetPos = (vector)gTargetPos1;
locationN = llList2String(objectD,1);
gStartPos = llGetPos();

llSetSitText(gSitText);
llSitTarget(<0,0,1>,ZERO_ROTATION);

}

on_rez(integer startup_param)
{
llResetScript();
}
touch_start(integer nr)
{

if(llDetectedKey(0)==llGetOwner()){
ii += 1;
llSetTimerEvent(5);
if(ii<2) llInstantMessage(llGetOwner(),"Right click me to teleport to "+locationN+ "\n =Or touch me 2 times to update locations.=");
if ( ii > 1){
llInstantMessage(llGetOwner(),"Updating Locations");
llResetScript();

}
}
else{
llInstantMessage(llDetectedKey(0),"Right click me to teleport to "+locationN);
}



}
timer()
{
ii=0;
llSetTimerEvent(0);
}
changed(integer change){
if(change & CHANGED_LINK)
{

gAvatarID = llAvatarOnSitTarget();

if(gAvatarID != NULL_KEY)
{
llSetAlpha(0.0,ALL_SIDES);
warpPos(gTargetPos);

llSleep(1);

llUnSit(gAvatarID);

llSleep(1);

if (gReturnToStartPos)
{
// ... send object to its start position
warpPos(gStartPos);
llSetAlpha(1.0,ALL_SIDES);
}
}
}
}

}

 

 
Comments
Add comments: EASY LONG DISTANCE TELEPORTER

Enter your comment below:

(required)

(required)

Your email will not be displayed on the site; only to our administrator.





 

free lindens
 
spacer.png, 0 kB
   
free joomla templates Joomla tutorials joomla themes