Nika Talaj Posted September 2, 2019 Share Posted September 2, 2019 (edited) If you like to go boating/sailing, and you live in a region that has water but no rez zone, or it's far away, the script below may help. It teleports you and your boat from your yard to the water. Here's the process to use it: 1. Rez your boat in your yard. If it goes physical and falls over, ignore that. 2. Figure out where you'd like the boat to go (location and rotation IN YOUR REGION), and put that into the description field of the boat. See script header for format. 3. Put the script into the boat's inventory. 4. Sit in the boat, as usual. As soon as you sit, it will immediately go to the location you set. The script then deletes itself, after blanking out the description. Just for kicks, you can limit this teleport function to happening for owner only, group, or everyone. Info on how to config that, and other details, are in the script header. For my house in Foxbridge, I made a copy of my boat that has a nearby water location already in the description, and the script already in the boat. Whenever I want to sail, I just rez it in my backyard and sit on it. I'm in the water, hoist sail and go! Obviously this won't work if your boat already has some sort of config info in the description. I tested a BWind engine Bandit, and a Trudeau boat, and both were OK. I hesitated to post this, thinking it could be used to grief people. But it isn't any different from any other teleport script, so here goes. I stripped down a more general-purpose script to make this, so if there are a couple of lines that are just plain extra, don't fret. Edited this to put the script in a "code" section (thanks Quartz!). Also cleaned up comments, removed unused leftover code, and retested. Function is the same as when I originally posted (last night). This was written so that newer coders can hopefully modify it easily. To any code warriors out there who are offended by neglected opportunities to minimize bytecode size ... lol move on, nothing to see here! Editing again to add: If you'd like to try it but have never made a new script, you can pick up a copy on the porch at http://maps.secondlife.com/secondlife/Foxbridge/213/108/23 It's a blue box with a rotating texture for sale for 0L$. // Boat Teleporter // Point-to-point teleport of an avatar sitting on an object, generally a boat. Does not unsit // after arrival. Destination position & rotation in object description. Script deletes itself // after a single use. //---------------------------------- // Setup: // 1. Change boat description (under name in General tab on Build/Edit menu). // See format below. // 2. Put script in boat. Your boat is now a single-use teleporter. When you sit, it will // immediately go to the destination you've configured, and then the boat description will be set // to an empty string and the script will delete itself. // You should see the destination echoed in chat. // 3. Sit on the boat. It should immediately move to the destination. // Description format: // <destination position x, y, z>; <destination rotation Euler (from the build menu) x, y, z> ; Access // Where "Access" = A for all, O for owner, G for group. If missing, defaults to group // Example Description: // <189, 174, 20.25>; <0, 0, 349.5>; A // Note that Bellisseria water is at 20m; I set Z to 20.25 just to avoid any possibility of collision. // You can use the list ALWAYS to hard-code a list of avatar UUIDs to always permit to use, // regardless of their group. I've set a hopefully harmless one below, just to show how. // If there is a hill between the starting point and the destination, your avatar may collide // with that land, making the boat land in the wrong place. If this happens, set the variable // JUMP to some value like 20. // All this does is move you 20m vertically before teleporting to your destination; that will // probably be adequate to avoid the collision. // You cannot set the destination to 0,0,0 // The destination can be anywhere within the region, up to 4096m high // Whenever you change the description/position, must reset script // There is little error checking on setting the destination; if you just type in text // instead of x,y,z the script will detect it and give you an error, but if you type in // 139,0;10023 you will end up lost when you TP. // If the boat is moved before you get in, it's OK, it will automatically recalculate the TP target. // ---- Globals ------------------------------ vector targetPos; rotation targetRot; string access; // A for all, O for owner, G for group. null = G. integer JUMP = 0; // set to number of meters to go vertical before TPing // Ebbe Linden, Quartz Mole list ALWAYS = ["24603c24-cfe6-4adc-9965-6da2df2d7c08", "efd3d802-701d-48f0-93ab-fce050e6f2ac"]; // ---- SUBROUTINES ------------------------------ // ----------------------------------------------- rotation NormRot(rotation Q) { float MagQ = llSqrt(Q.x*Q.x + Q.y*Q.y +Q.z*Q.z + Q.s*Q.s); return <Q.x/MagQ, Q.y/MagQ, Q.z/MagQ, Q.s/MagQ>; } // ----------------------------------------------- reset() //sets target position etc { list scrat; // Parse object description scrat = llParseString2List(llGetObjectDesc(),[";"],[]); // position vector; rot vector; access access = llStringTrim(llToUpper(llList2String(scrat, 2)), STRING_TRIM); if (access == "") access = "G"; // default to group access targetPos = (vector)llStringTrim(llList2String(scrat, 0), STRING_TRIM); targetRot = NormRot(llEuler2Rot((vector)llStringTrim(llList2String(scrat, 1), STRING_TRIM) * DEG_TO_RAD ) ); llSay(0, "Target: " + (string)targetPos + ", rotation: " + (string)targetRot); if (targetPos == ZERO_VECTOR) { // user probably typed in a text desc targetPos = llGetPos(); llSay(0, "Bad destination in object description: use format x,y,z"); } } // endreset default { state_entry() { reset(); } on_rez(integer startup_param) { llResetScript(); } changed(integer change) { integer success; key whosat; integer ok; if (change & CHANGED_LINK) { whosat = llAvatarOnSitTarget(); if (whosat != NULL_KEY) { ok = FALSE; if (access == "A") ok = TRUE; else if (llListFindList(ALWAYS, [(string)whosat])!= -1) ok = TRUE; else if ((access == "O") && (whosat == llGetOwner()) ) ok = TRUE; else if ((access == "G") && llSameGroup(whosat) ) ok = TRUE; // if avie doesn't have access, just wait for next sit if (ok) { // agent has access to teleport script if (JUMP) { llSetPos(targetPos + <0,0, JUMP>); llSleep(5.0); } success = llSetRegionPos(targetPos); llSetRot(targetRot); if (!success) llSay(0, "Move unsuccessful, check destination."); // either way, reset description & delete script llSetObjectDesc(""); llRemoveInventory( llGetScriptName() ); // delete this script } else llSay(0, "Sorry, you do not have access to the boat teleporter"); } // end of avatar sat } else if (!(change & CHANGED_COLOR)) //some other prim change event { reset(); } } // end changed event moving_end() { reset(); // try to compensate for object movement } } // end default Edited September 2, 2019 by Nika Talaj note about box 12 30 1 Link to comment Share on other sites More sharing options...
Armani223 Posted September 2, 2019 Share Posted September 2, 2019 😳 that looks and sounds like a foreign language too me. Lol I’m very technologically challenged 😂 1 2 Link to comment Share on other sites More sharing options...
Moles Quartz Mole Posted September 2, 2019 Moles Share Posted September 2, 2019 4 hours ago, Nika Talaj said: If there is a special way to post code in these forums, feel free to tell me. Click the code button, <>, in the bar above the box where you type, and then copy-paste your code into the window that appears: It's maybe worth noting that the function llSetRegionPos, which this script uses, will move the object to a position on the same region as which you start (or 10 metres over the border, I think). So you can use it to "teleport" the object round your region but you can't move to a coastal region from a landlocked one. (You know this, obviously, Nika, but other readers might not). 8 13 Link to comment Share on other sites More sharing options...
Clarre Marques Posted September 2, 2019 Share Posted September 2, 2019 This is awesome. I learned so much today! Thanks for this thread. 4 1 Link to comment Share on other sites More sharing options...
Nika Talaj Posted September 2, 2019 Author Share Posted September 2, 2019 (edited) Thanks @Quartz Mole! I cleaned the post up a bit. If anyone finds this useful, please post here. If enough do, I'll give it to the Bellisserian folks to add to their freebies. If you'd like to try it but have never made a new script, you can pick up a copy on the porch at http://maps.secondlife.com/secondlife/Foxbridge/213/108/23 It's a blue box with a rotating texture for sale for 0L$. (Feel free to poke around if you'd like, but there's nothing at all striking about our place - it's just our comfy beach house.) Also, please make sure you have enough available LI before you rez your boat on your parcel! Most boats are about 32, but we all have access to premium sandboxes, which would be a great place to just try using the script. There is no magic to finding the position & rotation you want for your boat. Just rez it and move it using edit to where you want it. Then copy the position & rotation to chat to save them, delete the boat (it'll probably poof as soon as you take it out of edit) and go back and set one up on your land. [Note: in Firestorm, you will see on the object tab of the build menu these tiny little buttons with a "c" or "p" in them next to the position and rotation fields. If you hit a "c" one, it will copy the position or rotation into your clipboard as a vector, that is, in the exact format you need for this script]. Edited September 2, 2019 by Nika Talaj 4 3 Link to comment Share on other sites More sharing options...
Malayaa Morningstar Posted September 2, 2019 Share Posted September 2, 2019 Hi, this worked great! I used the script from your porch, put it in a Yachtline 420 boat, and it zipped right to the spot. The only flailing around was operator error, I kept trying to re-use the boat that was freshly "returned" in my inventory and could not figure out why the TP script went away, then re-read your explanation and saw that it automatically deletes itself LOL. Thanks so much for providing this 3 1 Link to comment Share on other sites More sharing options...
Prokofy Neva Posted September 3, 2019 Share Posted September 3, 2019 20 hours ago, Nika Talaj said: If you like to go boating/sailing, and you live in a region that has water but no rez zone, or it's far away, the script below may help. It teleports you and your boat from your yard to the water. Here's the process to use it: 1. Rez your boat in your yard. If it goes physical and falls over, ignore that. 2. Figure out where you'd like the boat to go (location and rotation IN YOUR REGION), and put that into the description field of the boat. See script header for format. 3. Put the script into the boat's inventory. 4. Sit in the boat, as usual. As soon as you sit, it will immediately go to the location you set. The script then deletes itself, after blanking out the description. Just for kicks, you can limit this teleport function to happening for owner only, group, or everyone. Info on how to config that, and other details, are in the script header. For my house in Foxbridge, I made a copy of my boat that has a nearby water location already in the description, and the script already in the boat. Whenever I want to sail, I just rez it in my backyard and sit on it. I'm in the water, hoist sail and go! Obviously this won't work if your boat already has some sort of config info in the description. I tested a BWind engine Bandit, and a Trudeau boat, and both were OK. I hesitated to post this, thinking it could be used to grief people. But it isn't any different from any other teleport script, so here goes. I stripped down a more general-purpose script to make this, so if there are a couple of lines that are just plain extra, don't fret. Edited this to put the script in a "code" section (thanks Quartz!). Also cleaned up comments, removed unused leftover code, and retested. Function is the same as when I originally posted (last night). This was written so that newer coders can hopefully modify it easily. To any code warriors out there who are offended by neglected opportunities to minimize bytecode size ... lol move on, nothing to see here! Editing again to add: If you'd like to try it but have never made a new script, you can pick up a copy on the porch at http://maps.secondlife.com/secondlife/Foxbridge/213/108/23 It's a blue box with a rotating texture for sale for 0L$. // Boat Teleporter // Point-to-point teleport of an avatar sitting on an object, generally a boat. Does not unsit // after arrival. Destination position & rotation in object description. Script deletes itself // after a single use. //---------------------------------- // Setup: // 1. Change boat description (under name in General tab on Build/Edit menu). // See format below. // 2. Put script in boat. Your boat is now a single-use teleporter. When you sit, it will // immediately go to the destination you've configured, and then the boat description will be set // to an empty string and the script will delete itself. // You should see the destination echoed in chat. // 3. Sit on the boat. It should immediately move to the destination. // Description format: // <destination position x, y, z>; <destination rotation Euler (from the build menu) x, y, z> ; Access // Where "Access" = A for all, O for owner, G for group. If missing, defaults to group // Example Description: // <189, 174, 20.25>; <0, 0, 349.5>; A // Note that Bellisseria water is at 20m; I set Z to 20.25 just to avoid any possibility of collision. // You can use the list ALWAYS to hard-code a list of avatar UUIDs to always permit to use, // regardless of their group. I've set a hopefully harmless one below, just to show how. // If there is a hill between the starting point and the destination, your avatar may collide // with that land, making the boat land in the wrong place. If this happens, set the variable // JUMP to some value like 20. // All this does is move you 20m vertically before teleporting to your destination; that will // probably be adequate to avoid the collision. // You cannot set the destination to 0,0,0 // The destination can be anywhere within the region, up to 4096m high // Whenever you change the description/position, must reset script // There is little error checking on setting the destination; if you just type in text // instead of x,y,z the script will detect it and give you an error, but if you type in // 139,0;10023 you will end up lost when you TP. // If the boat is moved before you get in, it's OK, it will automatically recalculate the TP target. // ---- Globals ------------------------------ vector targetPos; rotation targetRot; string access; // A for all, O for owner, G for group. null = G. integer JUMP = 0; // set to number of meters to go vertical before TPing // Ebbe Linden, Quartz Mole list ALWAYS = ["24603c24-cfe6-4adc-9965-6da2df2d7c08", "efd3d802-701d-48f0-93ab-fce050e6f2ac"]; // ---- SUBROUTINES ------------------------------ // ----------------------------------------------- rotation NormRot(rotation Q) { float MagQ = llSqrt(Q.x*Q.x + Q.y*Q.y +Q.z*Q.z + Q.s*Q.s); return <Q.x/MagQ, Q.y/MagQ, Q.z/MagQ, Q.s/MagQ>; } // ----------------------------------------------- reset() //sets target position etc { list scrat; // Parse object description scrat = llParseString2List(llGetObjectDesc(),[";"],[]); // position vector; rot vector; access access = llStringTrim(llToUpper(llList2String(scrat, 2)), STRING_TRIM); if (access == "") access = "G"; // default to group access targetPos = (vector)llStringTrim(llList2String(scrat, 0), STRING_TRIM); targetRot = NormRot(llEuler2Rot((vector)llStringTrim(llList2String(scrat, 1), STRING_TRIM) * DEG_TO_RAD ) ); llSay(0, "Target: " + (string)targetPos + ", rotation: " + (string)targetRot); if (targetPos == ZERO_VECTOR) { // user probably typed in a text desc targetPos = llGetPos(); llSay(0, "Bad destination in object description: use format x,y,z"); } } // endreset default { state_entry() { reset(); } on_rez(integer startup_param) { llResetScript(); } changed(integer change) { integer success; key whosat; integer ok; if (change & CHANGED_LINK) { whosat = llAvatarOnSitTarget(); if (whosat != NULL_KEY) { ok = FALSE; if (access == "A") ok = TRUE; else if (llListFindList(ALWAYS, [(string)whosat])!= -1) ok = TRUE; else if ((access == "O") && (whosat == llGetOwner()) ) ok = TRUE; else if ((access == "G") && llSameGroup(whosat) ) ok = TRUE; // if avie doesn't have access, just wait for next sit if (ok) { // agent has access to teleport script if (JUMP) { llSetPos(targetPos + <0,0, JUMP>); llSleep(5.0); } success = llSetRegionPos(targetPos); llSetRot(targetRot); if (!success) llSay(0, "Move unsuccessful, check destination."); // either way, reset description & delete script llSetObjectDesc(""); llRemoveInventory( llGetScriptName() ); // delete this script } else llSay(0, "Sorry, you do not have access to the boat teleporter"); } // end of avatar sat } else if (!(change & CHANGED_COLOR)) //some other prim change event { reset(); } } // end changed event moving_end() { reset(); // try to compensate for object movement } } // end default I wonder if you could use the same thing for a car or an animal, but usually they aren't on mod. 1 Link to comment Share on other sites More sharing options...
animats Posted September 3, 2019 Share Posted September 3, 2019 1 hour ago, Prokofy Neva said: I wonder if you could use the same thing for a car or an animal, but usually they aren't on mod. Sure you can. I have an alternative system, but it only works for properties right on the water but separated by a strip of Linden beach. It extends a temporary track from the boat storage rack out into the water. Then the boat can slide down the track. When not in use, the track retracts back onto your own property. I want to improve it so it has a boat trailer like thing that carries the boat. These are called "marine railways" in real life. Just have to cross that narrow strip of Linden beach... 4 Link to comment Share on other sites More sharing options...
Nika Talaj Posted September 3, 2019 Author Share Posted September 3, 2019 5 hours ago, Prokofy Neva said: I wonder if you could use the same thing for a car or an animal, but usually they aren't on mod. For a car, definitely, use the same script in the same way. For an animal, remember, this script triggers when an avatar sits on the object. So I guess it depends what sort of animal! Rideable camel ... oh yes. Squirrel ... not so much. 😊 3 2 Link to comment Share on other sites More sharing options...
Alyona Su Posted September 3, 2019 Share Posted September 3, 2019 On 9/2/2019 at 10:47 AM, Malayaa said: Hi, this worked great! I used the script from your porch, put it in a Yachtline 420 boat, and it zipped right to the spot. The only flailing around was operator error, I kept trying to re-use the boat that was freshly "returned" in my inventory and could not figure out why the TP script went away, then re-read your explanation and saw that it automatically deletes itself LOL. Thanks so much for providing this You may want to consider this little tool. I can see that rezzer and this "personal rez zone" script working together in pure awesome solidarity! https://marketplace.secondlife.com/p/Vehicle-Sensor-Rezzer/17967895 4 2 Link to comment Share on other sites More sharing options...
DemeraraGirl Posted September 15, 2019 Share Posted September 15, 2019 (edited) On 9/2/2019 at 2:00 PM, Nika Talaj said: If anyone finds this useful, please post here. If enough do, I'll give it to the Bellisserian folks to add to their freebies. It is very useful. Even though my house is very close to the water, I think that now, using the script, it's easier to just rezz and ride rather than rezz, sit and drag it into the water. I'm using it all the time. I also tested in a place farther from my house, in same region, and it worked perfectly. Thank you so much for sharing this! Edited September 15, 2019 by DemeraraGirl 8 1 Link to comment Share on other sites More sharing options...
RaeLeeH Posted September 18, 2019 Share Posted September 18, 2019 (edited) I just tested this and it works great. Now I'm able to use the canal for more than just a pretty view . This is such a handy and IMHO necessary script. Anyone living near the water really should have this. 👍 Now a little off topic but still relevant; anyone have suggestions for good low LI boats? I'm currently using (TMS) Cadet - Sea Boss at 5 LI. It does serve it's purpose but just in case I feel like a change. I searched MP and came up with a few motor boats from TUFF but most others seem to be heading into double digits LI. EDIT: I've probably gone a roundabout way of doing this (and I'm far from an expert when it comes to scripting so I'm sure there's an easier way to do it) but I've rezzed a model of my boat in my yard and positioned it against the fence with all the scripts and animations removed so it's basically just a prop. In the root prim of it I added an owner only rez script (so my land doesn't become cluttered with copies as I only have 9 LI left) that way when I touch the model it rezzes a driveable copy of my boat beside it. Now when I sit on it, it immediately transports me to the water's edge of the canal. Saves me having to rez a copy of the scripted version every time. (And now I feel like a bad parent. Riley doesn't have a flotation device on. Here's hoping Zooby makes one, stat! With me at the helm she'll need all the help she can get!) Also the LM in the OP didn't work for me. I just copied the script from here and it worked fine. Thanks again @Nika Talaj! Edited September 18, 2019 by RaeLeeH Added stuff. And a pic. And fixed typos. OMG >.< 2 Link to comment Share on other sites More sharing options...
Evangeline Arcadia Posted September 18, 2019 Share Posted September 18, 2019 28 minutes ago, RaeLeeH said: Now a little off topic but still relevant; anyone have suggestions for good low LI boats? I'm currently using (TMS) Cadet - Sea Boss at 5 LI. It does serve it's purpose but just in case I feel like a change. I searched MP and came up with a few motor boats from TUFF but most others seem to be heading into double digits LI. Because of the initial lack of rez zones when exploring Bellisseria I've really gotten into wearable vehicles, so easy to use. I have a wearable row boat (from What's next Gacha I think) that I can pop on any time I want to jump on the water. No LI counting required!:) 2 2 Link to comment Share on other sites More sharing options...
RacyAcey Posted September 20, 2019 Share Posted September 20, 2019 On 9/3/2019 at 12:07 AM, animats said: Sure you can. I have an alternative system, but it only works for properties right on the water but separated by a strip of Linden beach. It extends a temporary track from the boat storage rack out into the water. Then the boat can slide down the track. When not in use, the track retracts back onto your own property. I want to improve it so it has a boat trailer like thing that carries the boat. These are called "marine railways" in real life. Just have to cross that narrow strip of Linden beach... I just gave up my house that was on a canal....of course there was a grassy, rocky area between my property & the water - but I just got in the boat & made it go & I landed in the water...... 2 Link to comment Share on other sites More sharing options...
Leora Jacobus Posted November 7, 2019 Share Posted November 7, 2019 Very interisting!! should not be forgotten! ... so push ... push!! 4 Link to comment Share on other sites More sharing options...
Eleanor Anderton Posted April 23, 2020 Share Posted April 23, 2020 Even though Bellessaria has more rez zones this spring, this is good to know how just to push your boat into the nearest ocean, lake, river, or pond! 1 Link to comment Share on other sites More sharing options...
animats Posted April 24, 2020 Share Posted April 24, 2020 21 hours ago, Eleanor Anderton said: Even though Bellessaria has more rez zones this spring, this is good to know how just to push your boat into the nearest ocean, lake, river, or pond! In Bellessaria, the rez zones are marked. I'd like to see that on more of mainland. Zindra has a nice ocean but there are few rez zones, and even fewer know where they are. Hint: the south side of the river at the Port of Kama City has some rez zones. Good sailing practice to get down the river and out to the ocean on sail alone. 2 Link to comment Share on other sites More sharing options...
Persephone Emerald Posted March 28, 2022 Share Posted March 28, 2022 I'm kicking this thread back up to the top because it's awesome. Also, when you have an object that your might take back into inventory but you want to be able to put back in the same location, type the coordinates for where you want it to go in the Description field of its Edit window. Now you can enter those coordinates into it's position and it will be right back where you want it to be. This only works for stuff you rez from your inventory, not for stuff you rez from a rezzor device. 4 Link to comment Share on other sites More sharing options...
So Whimsy Posted March 28, 2022 Share Posted March 28, 2022 29 minutes ago, Persephone Emerald said: I'm kicking this thread back up to the top because it's awesome. Also, when you have an object that your might take back into inventory but you want to be able to put back in the same location, type the coordinates for where you want it to go in the Description field of its Edit window. Now you can enter those coordinates into it's position and it will be right back where you want it to be. This only works for stuff you rez from your inventory, not for stuff you rez from a rezzor device. -Hey this is a pretty nifty idea! 2 Link to comment Share on other sites More sharing options...
Trinity Blakewell Posted March 28, 2022 Share Posted March 28, 2022 Whenever I've had a property that touches the water, I have been able to rez the boat from my inventory on my land, sit in it, select the boat, and drag it into the "public" water, without any scripts. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now