Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Teleporting Between Sims

Purplo Pizzicato
Registered User
Join date: 10 Sep 2007
Posts: 2
01-21-2008 04:42
Hi there. I'm building an educational garden in second life and would like to create teleport points for users to move to other useful scientific sites I've found in world.

The problem is that every piece of scripting advice I can find moves only within the same sim so each attempt dumps my avatar at the x,y,z coordinates in my own area only.

Could anyone please advise me on how to script teleportation to other sims/regions. Any way to specify region/sim in which to use the given coordinates?
Siann Beck
Beauty & Braiiiiinsss!
Join date: 14 Jul 2007
Posts: 140
01-21-2008 05:16
AFAIK there is no way to do it. Teleporters that you see are exploiting a characteristic of sit targets -- namely, the sit target of a prim can be up to 300m away. So when you right-click and select "Teleport", you're actually "sitting" on the prim; once you've "teleported" to the sit target, the script unseats you.

The only way for an av to teleport more than 300m away is to use a landmark.
Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
01-21-2008 05:32
Not really. Map based teleporters like Beam-Me-Anywhere or Beam-Me-HUD that I sell can do it. As Siann suggested, they can be based on dropping landmarks into them like mine, but could also be configure by note card. Essentially, map based teleporters use llMapDestination rather than sitting on the target.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-21-2008 06:41
From: Siann Beck
The only way for an av to teleport more than 300m away is to use a landmark.


You forgot warpPos, make the limit around 1,000 meter maximum
_____________________
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
Purplo Pizzicato
Registered User
Join date: 10 Sep 2007
Posts: 2
01-21-2008 06:42
Thanks guys. I will try out both ideas and see what I can make work for me.

Ideally I plan to have several pictures hanging on a wall. On clicking each of these, an avatar should be teleported directly or given the teleport option immediately, hopefully without too many extra clicks for usuability sake.
Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
01-21-2008 07:41
WarpPos will have its get caught up in ban lines or no entry areas between your origin and target, so unless you or your friends own all the land in between, you could have problems.

You could easily set up a one destination teleporter to bring up the map upon touch using llMapDestination. If you want the user to be able to select from multiple destinations in one teleporter, say from a dialog menu, you would usually have to touch the teleporter again after selection unless you write special code to avoid that as I had to do for my model.
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
01-21-2008 08:07
From: Purplo Pizzicato
Thanks guys. I will try out both ideas and see what I can make work for me.

Ideally I plan to have several pictures hanging on a wall. On clicking each of these, an avatar should be teleported directly or given the teleport option immediately, hopefully without too many extra clicks for usuability sake.



I would suggest having the picture give them a landmark. This will then appear on screen with the teleport option on it.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-21-2008 08:59
for multi sim transports map destination is your friend, and can work with a minimum of 2+ clicks for multiple destinations, or 2 with a single destination (zero+ to change destinations, one to pop up a map with the destination selects, and one for teleport). the benifit being you see where you're going.

similarly you can just give out the landmark (same # of clicks as above), the benefit being the user has a landmark to the destination to return later, just depends on the style you choose to offer

warpos limitations are ban zone and no script properties, which can be scripted around, but will require multiple calls to get to a destination more than a few sims distance, or that have to go roundabout. the benefit being 1 less click if scripted specifically(though the norm is the same as above), and not having to teleport (a good thing some days)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-21-2008 10:39
Right. If you use multiple scripts to handle dialogs, communicating without the one script leaving its touch event (object name, description, etc.), you can pop up a dialog and THEN do the llMapDestination() without another click. Downside is that it'll hang up the script for a period, so others cannot use it (you can try some kind of tricky communication scheme to try to distribute handling of touches across multiple scripts, but that gets to be a major pain...). Also, as a minor corner case, I believe llMapDestination() will pop the map up for everyone who might happen to touch at the same time, so you either have to disqualify such events or have one person choose the destination for all of them.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-21-2008 11:50
From: Hewee Zetkin
Right. If you use multiple scripts to handle dialogs, communicating without the one script leaving its touch event (object name, description, etc.), you can pop up a dialog and THEN do the llMapDestination() without another click. Downside is that it'll hang up the script for a period, so others cannot use it (you can try some kind of tricky communication scheme to try to distribute handling of touches across multiple scripts, but that gets to be a major pain...). Also, as a minor corner case, I believe llMapDestination() will pop the map up for everyone who might happen to touch at the same time, so you either have to disqualify such events or have one person choose the destination for all of them.

heh actualy we solved it in 2 scripts, script one handles the touch, sends a message to script 2 to to read the landmark and enters a pollin loop waiting on a description field change, script 2 reads the landmark, pastes the location (or a timeout value) into the description field, script one pics up the change, and passes it into map destination, then clears the description field. it could probably be handled in one script by preloading all the landmarks, but where's the fun in that?

you are dead on for the simultaneous touches, they'll all pop the same location, but then that isn't the selection click, that's the goto click... and if you handle the selection click as a seperate prim button, rather than a dialog, there's less chance of getting a borked location for one of the simultaneous touchers.

best case is 2 prims, one script, if the child is touched, it cycles and reads the next landmark, if the root is touched, it calls map destination on the currently loaded landmark. single location version would just load the landmark at start up and pop the map on touch.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
01-21-2008 13:14
Did they fix that problem where if you're sitting on a non-physical object while it crosses into another region, you get disconnected? I figured that was the biggest problem :o
_____________________
Gypsy Paz
Registered User
Join date: 28 Dec 2005
Posts: 17
02-10-2008 01:43
CODE

string sim;
vector loc;

string ttext;
vector tcolor;

key LMid;
integer on;

init(){
tcolor = (vector)llGetObjectDesc();

if ( llGetInventoryNumber(INVENTORY_LANDMARK) > 0 ){
LMid = llRequestInventoryData(llGetInventoryName(INVENTORY_LANDMARK, 0));
ttext = llGetInventoryName(INVENTORY_LANDMARK, 0);
on = TRUE;
}
else{
tcolor = <1,0,0>;
ttext = "Landmark not found";
on = FALSE;
}
llSetText(ttext,tcolor,1);
}


default{
state_entry(){
init();
}

on_rez(integer start_param){
llResetScript();
}

touch_start(integer total_number){
llMapDestination(sim,loc,loc);
if ( llDetectedKey(0) == llGetOwner() ){
init();
}
}

changed(integer change){
if (change & CHANGED_INVENTORY){
init();
}
}

dataserver(key requestID, string data){
if ( requestID == LMid ){
LMid = NULL_KEY;
sim = llGetRegionName();
loc = (vector)data;
}
}

}
snapper Desade
Registered User
Join date: 9 Jul 2006
Posts: 1
03-25-2008 12:35
From: Day Oh
Did they fix that problem where if you're sitting on a non-physical object while it crosses into another region, you get disconnected? I figured that was the biggest problem :o


I was working on a transim teleportor sometime ago but have been busy and unable to find the time to finish it, but it will easily move you anywhere you need to go in the next sim.

basically you:
1. use warpros to teleport at the border of both sims.
2. pause for about 8 seconds. (this is important as the next sim needs to know your coming and register you avatar)
3. use setposition to move 10 meters across border.
4. pause again for a few seconds.
5. Use warpros to your selected destination.

The pauses are the key, without them moving across regions becomes unstable. using this method i can successful teleport to the next sim with in around 17 seconds safely. It seems the next sim needs to know your coming and have time to add you to the server. though it is possible to jump a sim or even a couple of in a second or so, but it to unreliable to be useful in my tests.
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
03-25-2008 13:51
Interessante! <3
_____________________
Cherry Hainsworth
Registered User
Join date: 31 Jul 2006
Posts: 125
03-26-2008 20:52
Hi, Purplo. Here's a script you can use:-

CODE


// Map teleport.
// Cherry Hainsworth, November 2007


GlobalMapDestination(vector position, vector lookat)
{
vector c = llGetRegionCorner();
llMapDestination(llGetRegionName(), position - c, lookat - c);
}


key request;
string name;
string sim_name;
vector pos;

default
{
state_entry()
{
llSetStatus(STATUS_BLOCK_GRAB, TRUE);
llSetSitText(" ");
llSetTouchText("Teleport");
llAllowInventoryDrop(1);
if(llGetInventoryNumber(INVENTORY_LANDMARK))
{
name = llGetInventoryName(INVENTORY_LANDMARK,0);
request = llRequestInventoryData(name);
}
else
llWhisper(0,"Please drop a landmark on me");
}
dataserver(key id, string data)
{
if(id == request)
{
pos = (vector)data;
sim_name = llGetRegionName();
llSetText("Touch to go to " + name ,<1.0,1.0,1.0>,0.65);
}
}
touch_start(integer a)
{
if(name != "")
llMapDestination(sim_name, pos, pos);
}
changed(integer a)
{
if(a & (CHANGED_INVENTORY | CHANGED_ALLOWED_DROP))
if(llGetInventoryNumber(INVENTORY_LANDMARK))
request = llRequestInventoryData(name = llGetInventoryName(INVENTORY_LANDMARK,0));
}
}

CODE


Put it in each of your pictures, drop the appropriate landmark into each picture and Bob's your uncle :)

I based the above script on one from the Wiki, but I'm afraid I don't know who posted the original.

Cheers,
Cherry.
_____________________
=================
My stuff on XSt:-
http://tinyurl.com/383mgh
Awaken Yoshikawa
Registered User
Join date: 16 Mar 2007
Posts: 19
Pardon my ignorance
04-05-2008 09:18
Can someone tell me how to drop a landmark into the texture?

Thanks
Eazel Allen
EA-design™
Join date: 11 Feb 2007
Posts: 123
05-19-2008 04:32
From: Awaken Yoshikawa
Can someone tell me how to drop a landmark into the texture?

Thanks


The texture is on a prim and you put the landmark in that prim I think.
_____________________
http://secondlife://cub/235/190/465/

http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=48444
Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
05-19-2008 10:19
You don't put the landmark in the texture. You put it in the contents of the object's inventory. The simplest way is to just drop the landmark onto the prim. The second way is to open the object's inventory and drop it in there (Right click on object -> Open)