Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

multi direction tp unit

Erik Hugo
Registered User
Join date: 26 Feb 2007
Posts: 30
06-07-2007 08:56
Hi All,

I tried to make a tp-ball which offers more than one locations to teleport to (this by presenting the user a list of directions in the little blue popup...) I found the scripts to tp and I found the way to script the blue popup presenting the chioces. When I combine them however.... tp doesn't work anymore. Does someone have script like this?
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
06-07-2007 09:33
It would be easy enough to make one, but this is kinda the wrong forum for a "product wanted" request. ;)

If, however, you wanted help making the one you have work, post some code and someone should be able to help you with it.
poopmaster Oh
The Best Person On Earth
Join date: 9 Mar 2007
Posts: 917
06-07-2007 10:40
i got it, touch object pops up dialog box with up to 12 locations then TP's anywhere in the sim, when i get home after 8pmEST i will shoot you a copy and post the code to the forum.
_____________________
InSL u find every kind of no-life retard you could possibly imagine as well as a few even Tim Burton couldnt imagine u find 12yr-olds claiming to be 40 men claiming 2 be women, women claiming 2 make sense and every1 claiming 2 have ideas that are actually worth a damn if only someone would just listen to their unique innovative and exceptionally important idea
Kepster Cure
Paradigm Shifter
Join date: 7 Jan 2006
Posts: 198
06-07-2007 11:19
Hey poopie:D Lookie where I find you small....virtual world (it is actually)

Is this a newer version of the one you were working on before? How does it work, the one I currently have you first touch for the blue drop down menu and after you select the destination you still have to sit on the object for it to teleport you.

What I am looking for is a teleport system that drops the blue menu down with several choices BUT I want it to tp you once you have selected a choice from that menu. I am trying to avoid having to sit on the object. What options are out there if this one is not possible in order to minimize steps to teleport between 2 points. Thanks in advance Poopmaster and/or anyone else that may be able to shed some light.


P.S. Poopie have I told you that your shirt "explitive deleted" rocks!
_____________________
Keeping the boundaries distant.

-Cure
poopmaster Oh
The Best Person On Earth
Join date: 9 Mar 2007
Posts: 917
06-07-2007 12:19
same one kepster


this question is open to everone and perhaps i should start a new thread about it?



Is there a way that once the choice of where you want to go is selected it TP's you there right away without having to retouch the object and hit /sit/teleport on the pie?

hope you enjoy the shirtz ;) i made about 10 of them last nite

i also made a 'free paris hilton' shirt but they let her out of jail allready

so i guess my shirts worked....
_____________________
InSL u find every kind of no-life retard you could possibly imagine as well as a few even Tim Burton couldnt imagine u find 12yr-olds claiming to be 40 men claiming 2 be women, women claiming 2 make sense and every1 claiming 2 have ideas that are actually worth a damn if only someone would just listen to their unique innovative and exceptionally important idea
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
06-07-2007 15:13
From: poopmaster Oh
same one kepster


this question is open to everone and perhaps i should start a new thread about it?



Is there a way that once the choice of where you want to go is selected it TP's you there right away without having to retouch the object and hit /sit/teleport on the pie?

hope you enjoy the shirtz ;) i made about 10 of them last nite

i also made a 'free paris hilton' shirt but they let her out of jail allready

so i guess my shirts worked....



Yes, you make the default action sit rather than touch and have the changed event trigger the dialog.
_____________________
I'm back......
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
06-07-2007 22:32
From: Newgate Ludd
Yes, you make the default action sit rather than touch and have the changed event trigger the dialog.

By the time the changed event trigger occurs surely you already sitting and the change in sit target will only apply to the next "sitter".

Waiting for someone to come forward with a hack as clever as the fast move hack.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
06-07-2007 22:39
the way i do it is using warp-pos, by the time i headscratch and cuss trying to get a sit target tp to do magic i just find it easier to have the silly prim rez a copy of its self and shuttle away av attached

on the other end unsit and die
Erik Hugo
Registered User
Join date: 26 Feb 2007
Posts: 30
06-08-2007 01:16
hmmm... so a tp directly from the blue menu won't work.... didn't know that
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-08-2007 02:40
From: Erik Hugo
hmmm... so a tp directly from the blue menu won't work.... didn't know that


Well, it can: see Newgate's posting, but those are warpPos based. As ed44 says, a sitTarget based tp can't work that way. The sitTarget approach is slightly less laggy and possibly a bit simpler to script, but warpPos is equally reliable--well, except for that time LL broke warpPos.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
06-08-2007 08:56
Sorry, yes I was indeed meaning WarpPos/prim movement based TP rather than sit hacks.
_____________________
I'm back......
poopmaster Oh
The Best Person On Earth
Join date: 9 Mar 2007
Posts: 917
06-10-2007 07:59
////////////////////////////////////////////////////////////////
// 1000m Menu-driven Intra-Sim Teleporter



/////////////////////////////////////////////////////////////////
// Design:
//
// Menu system sets target location from pre-defined list
// When a user sits on the object it moves to the target location,
// unists the avatar, and returns. Use of WarpPos by Keknehv
// Psaltery makes this possible beyond the 10 metre limit normally
// associated with position changes.

/////////////////////////////////////////////////////////////////
// Quirks:
//
// If you move the teleporter after placing it you need to
// reset this script so it learns it's new home position
//
// All target locations must be under 768m in height
//
// All target locations must be in teh same sim as teh teleport
//
// Max distance is 1000m... but it's impossible to move more than
// 850m in a single sim without going higher than 768m.
//
// If use of llSetPrimitiveParams to bypass the 10m movement
// restriction is ever nerfed then this script will stop working.


/////////////////////////////////////////////////////////////////
// Usage
//
// Edit the list of locations.
// Place script in a prim
// Touch to get a menu to set destination
// Right click -> sit to teleport

/////////////////////////////////////////////////////////////////
//user variables, you should set these.

// A list of locations (names and position)
// This is for one sim only; teh sim the teleporter is in.
// No more than 12 locations or you'll get an error from llDialog
// Buttons are drawn left to right, bottom to top, in row of three.
list gLocations=[

"2nd Level",<196,119,241>,
"3rd Level",<195,119,341>,
"4th Level",<195,119,442>

];

// Text for the "pie menu"
string gSitText="Teleport";
// If you don't enable this teh teleport object will be left at the destination.
integer gReturnToStartPos=TRUE;
// Alpha for hovertext
float gTextAlpha=0.5;
// colour for hovertext
vector gTextColour=<1.0,1.0,1.0>;


/////////////////////////////////////////////////////////////////
//Runtime variables. You should leave these alone.

vector gStartPos=<0,0,0>;
key gAvatarID=NULL_KEY;
integer gChannel=574368374;
vector gTargetPos=<0,0,0>;


//////////////////////////////////////////////////////////////////
// Function for instant intra-sim movement
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) );
if (llVecDist(destpos, llGetPos()) > 0.01)
{
jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1;
count = 0;
while ( count < jumps)
{
llSetPos(destpos);
count++;
}
}
}
//////////////////////////////////////////////////////////////////
// Main codeblock.

default
{
state_entry() {
llSetSitText(gSitText);
gStartPos = llGetPos();
llSitTarget(<0,0,1>,ZERO_ROTATION);
gChannel=(integer)llFrand(1000000000)+1000000000;
llSetText(llList2String(gLocations,0),gTextColour, gTextAlpha);
gTargetPos=(llList2Vector(gLocations,1));
llListen(gChannel,"",NULL_KEY,"";);
}
on_rez(integer start_param){
llResetScript();
}
changed(integer change){
if(change & CHANGED_LINK)
{
gAvatarID = llAvatarOnSitTarget();
if(gAvatarID != NULL_KEY)
{
warpPos(gTargetPos);
llSleep(1);
llUnSit(gAvatarID);
llSleep(1);

if (gReturnToStartPos){
warpPos(gStartPos);
}
}
}
}

touch_start(integer number){
list options=[];
integer i =0;
for(i=0;i<llGetListLength(gLocations);i=i+2){
options+=[llList2String(gLocations,i)];
}
llDialog(llDetectedKey(0),"Choose target location",options,gChannel);
}

listen(integer channel, string name, key id, string message){
integer index=llListFindList(gLocations,[message]);
if (index==-1) return;
llSetText(llList2String(gLocations,index),gTextColour,gTextAlpha);
gTargetPos=llList2Vector(gLocations,index+1);
} }
_____________________
InSL u find every kind of no-life retard you could possibly imagine as well as a few even Tim Burton couldnt imagine u find 12yr-olds claiming to be 40 men claiming 2 be women, women claiming 2 make sense and every1 claiming 2 have ideas that are actually worth a damn if only someone would just listen to their unique innovative and exceptionally important idea