Saturday, December 15, 2012

SecondLife : Rolling Your Own Multiple Sim Cross Border Teleport Device

By Avatar JayR Cela

     I have 3 homes located on the Mallard River in SL, all of them adjacent to one in other. One is my personal place the other two are rentals. There are also 2 boat slips and an area for jet ski's my renters can keep their personal watercraft moored or relax in a romantic spot underneath my raised Living and Conference Rooms.



















 
     The only problem is since although all 3 homes are adjacent to one in other they lie in two separate Sims, ( Mallard, Buckler ) worse yet is that, the homes locations are  almost exactly on the corner of a third Sim also, so its like. ( Orwood, Mallard and Buckler ) As any old time SecondLifer knows crossing from one Sim to another on a 3 Sim corner location usually results in you flying off into the distance somewhere. I first tried building a short bridge in order for my tenants to easily be able to simply walk across to the boat slip area, not much luck with that idea, people kept ending up in limbo land stuck somewhere between the Sim corners.

    The obvious solution was to just have my tenants simply create a LM and and place it on their Favorites Bar,  ( A V3 based Viewer only feature ) but I wanted to install a TP device for them and their guests to have easy access too. The only problem is most all TP devices in SL are intended to work within 1 Sim and 1 Sim only, finding one capable of crossing you into another Sim proved to be a bit more difficult, especially with the corner location problems mentioned above. So I started searching around in SL at various gadget shops, finding units ranging from 150L$ to 2000L$ in price and 3 to 15 prims each, some of them even requiring that you needed 1 unit on each end, departure and destination. After contacting several of the developers I was told that because of the The Lab's SL server architecture structure there would be no guarantee's due to the corner sim crossing problem.

    I turned to a good friend of mine who is pretty handy with writing LSL script code. His idea was to place two 1 prim units on each end. Sounded reasonable enough to me, but alas after several days of his writing, adjusting and testing the code, we could get it partially working, but the dam corner location problem kept seeming to cause all kinds of oddball problems and difficulties.

     Hmmm, I decided to start Goggling for SecondLife scripting libraries, searching for free Telaport scripts, and their are a boat load of them out there, sadly not many devoted to Cross Sim Teleportation, or multiple  sim borders. Eventually I found one written by SL resident  Sheena Desade, developed in April 2012 and later updated in May by Donjr Spiegelbatt called the,
                 Sim-to-Sim_Pseudo-Teleporter_v40_1899

  After an entire evening of fooling around with it, the best results I could achieve were, I was able to TP from one Sim to another all right, but the locations were never correct. I was just about to give up on the idea, but decided to try contacting another good SL friend of mine who is a well know script writer, and see if she had any suggestions or knew of any easy to use free-bee scripts that may be available. She recommended the same one mentioned above. I explained that I had been working with it already and described the wrong destination location difficulties I was experiencing. She told me that the problem was more than likely the way I was parsing the location note-card, incorrect spacing between characters or what not. Sure enough she was right. After giving several more try's my new 1 prim TP device now works perfectly.

So today I will give you a step by step walk through of how to set one of these up properly. Here we go. Please note that in order for this to work you must have a Nearby Chat Window opened.


Step 1. go-to   
http://www.free-lsl-scripts.com/cgi/freescripts.plx?ID=1651

  Step   2. Download the script ( Copy and Paste does not always work with certain LSL scripts )
  Step   3. Open it with either Wordpad or LSLEdit or a Mac, Linux equivalent text editor.
  Step   4. Edit the first Line under Optional Settings. You can change the string Hover Text to something that better suits your chosen device's description, and  better suits your needs.

 24 // ******** OPTIONAL SETTINGS **********
 25 string hoverText    = "Sim-to-Sim Pseudo Teleporter - click for destinations.";
 26 integer menuWait    = 30;       // How long to wait for the user to pick a menu choice
 27 integer menuChannel = -14469;   // what channel for the object to 'listen' on.
 28                                 // You can change this channel as needed,
 29                                 // it's not calling out to an object outside of itself.
 30 string menuText = "Please select your destination:";
 31 string itemDataNotecard = "Data";
 32                                 // The name of the notecard to read from
 33 // ******** END OF OPTIONAL SETTINGS **********

                                                   In my case it was changing .

 25 string hoverText    = "Sim-to-Sim Pseudo Teleporter - click for destinations.";
                                                                 TO
  25 string hoverText    = "Teleport To Boat Slip Area's.";

Step    5. Save your edited file to desktop or somewhere you will remember and Start SL
Step    6. Open your inventory and select New Script, open that and delete the default Hello World portion














    Copy and paste the file you just finished editing  into the now blank script, save it back into your SL inventory and rename to something appropriate if you choose to. Please take note of Lines  31 and 32 in the Optional Settings section above describing the name of the note-card you will be creating later. (  By the way, it is case sensitive ) 

Step    7. Create an 1 prim object click on Edit open the Content Tab and drag a copy of your revised script there.

Step    8. Go to the locations in SL that you will be wanting to TP to, write the X,Y,Z coordinates down, and the name of the SL Sim as well.

Step    9. Open you inventory and create a new blank note-card. now you are ready to Name your Destination(s) name(s) ( You Can use what ever name you have chosen it does not matter ) then be sure to add a space before you type in the separator symbol  |  ( this is located directly above the Enter key on your keyboard and can be chosen by pressing the Shift and backslash \ key ) Insert another space and type in the name of the Sim ( remember it is case sensitive ) add another space then the @ symbol add another space and then your X,Y,Z coordinates separated with the forward slash symbol. Save it to your inventory and rename it to Data





    Please remember you must add spaces where appropriate, your final note card should look something like this

































    Step  10. Open your inventory and locate the new note-card, click on your object select Edit then open the Content Tab, now drag and drop the copy of your Data note-card into Content(s)











   
 

    After that, your pretty much finished, just a matter determining the shape and texture you desire. Here is what I came up with.





























   A 1 prim pseudo teleporter, really in all reality it is a  temporary  Land Mark Giver. So it is important  that your Chat Bar History Floater is Open ! That is were the temp LM will be displayed. One click on the Device, one click on the Menu, and then another on the LM address in your open Chat Bar History Floater.













    And Poof !!!!! / here I am right where I want to be :_)

     And a slightly modified copy placed at the end of the peer brings me right back in the same area I started from, either the front entrances of Rental 1 or Rental 2.






























    Being the fact that this script circumvents the usage of LSL calls that perform the function of getting an Avatar from one place to another via LSL call's ( llPos, warpPos, PosJump etc..) and a number of other things I have absolutely no knowledge of,   It simply generates a temporary LM from your Data note card, in an opened Nearby Chat Bar Window and it must be visible.  because I'm not a Scripter . ( I can not program my way out of a wet paper bag ) Lol :_)  I had to read the entire script a number of times, only to find the comments left by the original  programmers to be somewhat arcane and difficult to understand to say the least.

    Having lived here for about 6 years, I found this tool to be very useful in solving  a long standing problem. ( At least for me ) I can think of several other useful this tool can do, for Instance Cathy my SL partners house in located on a private island estate, far away from being anywhere near my mainland places. So I set up one in her Living Room to take us directly to our boat or romantic riverside area.





















 My hope is this step by step walk through, and small story of past frustration trying to fix it might prove to be useful for you too.

It can be downloaded here
http://www.free-lsl-scripts.com/cgi/freescripts.plx?ID=1651

JayR Cela :_)

No comments: