The Open Rings project was started by "CB Radek". Open Rings is now distributed as part of the Open Stargate Network. We are grateful for CB's contribution.
Open Rings is an in-sim transporter mechanism. Most settings and configuration can be accessed by the Open Rings touch menu.
To change the name of your Open Rings platform, set the object description. The default patform name is "default".
Open Rings can also transport objects. To transport objects, drop this script into your objects:
// ring-follow.lsl, object transportation script for SecondLife
//
// Drop this script into any object, it will follow the transporter
// prim when the rings are activated.
//
// Copyright (C) 2011 Adam Wozniak and Doran Zemlja
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////////////////////
// The warpPos() function is not subject to the openRings GNU-GPL licensing.
// "It's completely public domain. Look at it, modify it, sell it in an item, whatever.
// But I'll be annoyed if you scam noobs into buying it." - Keknehv Psaltery
//
// http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryWarpPos
warpPos( vector d ) //R&D by Keknehv Psaltery, ~05/25/2006
{
integer iterations;
vector curpos;
if ( d.z < (llGround(d-llGetPos())+0.01))
d.z = llGround(d-llGetPos())+0.01; //Avoid object getting stuck at destination
if ( d.z > 4096 ) //Object doesn't get stuck on ceiling as of 1.19
d.z = 4096; //havok 4 the height limit is increasing to 4096
do //This will ensure the code still works.. albeit slowly.. if LL remove this trick (which they have done and reverted in the past..)
{
iterations++;
integer s = (integer)(llVecMag(d-llGetPos())/10)+1; //The number of jumps necessary
if ( s > 200 ) //Try and avoid stack/heap collisions with far away destinations
s = 200; // with this script compiled to MONO, you'll have plenty of memory for this.
integer e = (integer)( llLog( s ) / llLog( 2 ) ); //Solve '2^n=s'
list rules = [ PRIM_POSITION, d ]; //The start for the rules list
integer i;
for ( i = 0 ; i < e ; ++i ) //Start expanding the list
rules += rules;
integer r = s - (integer)llPow( 2, e );
if ( r > 0 ) //Finish it up
rules += llList2List( rules, 0, r * 2 + 1 );
llSetPrimitiveParams( rules );
curpos=llGetPos();
if (iterations>200) {
d=curpos; //We're going nowhere fast, so bug out of the loop
}
} while (llVecDist(curpos,d) > 0.2);
}
////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
default {
state_entry() {
llListen(0x52696e67, "", NULL_KEY, "");
}
listen(integer unused_channel, string unused_name, key unused_id, string mesg) {
vector src_pos = (vector) llList2String(llParseString2List(mesg, ["|"], []), 0);
rotation src_rot = (rotation) llList2String(llParseString2List(mesg, ["|"], []), 1);
vector dst_pos = (vector) llList2String(llParseString2List(mesg, ["|"], []), 2);
rotation dst_rot = (rotation) llList2String(llParseString2List(mesg, ["|"], []), 3);
// calculate our offset from center, and adjust for rotation...
vector delta = ((llGetPos() - src_pos) / src_rot) * dst_rot;
if (llVecMag(delta) < 2.0) {
warpPos(dst_pos+delta);
// adjust our final rotation...
llSetRot((llGetRot() / src_rot) * dst_rot);
}
}
}
</pre>