Cross Sim tps
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
03-08-2005 09:24
Are cross sim tps possible? My first thought, using the 'sit hack', no, unless you run a chain of sit, SetPos etc. scripts back to back to set the final position...
Anyone seen a working one?
Under 1.6 if you have a webpage with a valid SL address could you javascript it or similar so that clicking on the link persuades your browser to send you to another location with an already open client window?
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
03-08-2005 09:44
In the vein of your final thoughts, what happens if we use llLoadURL() with a secondlife:// address?
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
03-08-2005 10:53
Uhh... let's see. From: someone Are cross sim tps possible? My first thought, using the 'sit hack', no, unless you run a chain of sit, SetPos etc. scripts back to back to set the final position...
Anyone seen a working one? The "sit hack" is pretty versatile - in its original, 300m form (not sure if that distance has been edited), you could potentially cross an entire sim with sit alone. So, in theory, yes - cross sim TPs are possible, and heck, so is cross-sim TPS.However... in practice, doing something like this encounters several problems. I've tested. 1) Your avatar data is not handed off quickly enough to the new sim, so many times you'll end up stuck in an "empty sim" to your client and be forced to relog. 2) Also in this vein of problems, it's difficult to release your avatar from sitting quickly enough. It, too, causes some display problems that are fixable by sitting and unsitting at the new destination. 3) It's potentially harder to nail down where the TP will go, since you need to calculate it in global position vectors to work it properly (or guess). 4) The two sims must also have a "line of sight" between one another or the TP will fail. Essentially, this means you can't "teleport" over a region where a sim does not exist. I would say the easiest method of doing this, then, would be to create a vehicle of some sort to cross between the two areas carrying avatars. In theory, that would allow data for clients to be passed between sims fast enough. From: someone Under 1.6 if you have a webpage with a valid SL address could you javascript it or similar so that clicking on the link persuades your browser to send you to another location with an already open client window? Only if you want to waste time with XML-RPC and your Movie URL on a piece of your parcel for a presently not-so-interactive-in-SL system. Personally I think this is like taking an elephant gun to a dust bunny. From: someone In the vein of your final thoughts, what happens if we use llLoadURL() with a secondlife:// address? My guess is if you found the proper asset URL (.mov, .swf, etc extension), this would work. However, I don't know how LL's system works as far as URL-blocking is concerned, so don't quote me.
_____________________
---
|
Till Stirling
Crazy Inventor
Join date: 31 Jul 2004
Posts: 124
|
03-08-2005 12:33
I tried to work a cross sim TP once... and failed The teleporter was right at the border of the sim and was supposed to teleport the avatar over the border.
Regardless of what offset I would enter, the avatar appeared at the same spot: 128, 128
So to my knowledge it is not possible.
Till Stirling
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
03-08-2005 14:02
From: Till Stirling I tried to work a cross sim TP once... and failed The teleporter was right at the border of the sim and was supposed to teleport the avatar over the border.
Regardless of what offset I would enter, the avatar appeared at the same spot: 128, 128
So to my knowledge it is not possible.
Till Stirling It's possible. I've done it before a few patches ago. It's just not too practical (See above).
_____________________
---
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
03-08-2005 14:04
Why not cannon the user across the border ? 
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Garth FairChang
~ Mr FairChang ~
Join date: 24 Jun 2003
Posts: 275
|
03-08-2005 14:07
I think llLoadURL URLs have to start with http or https, I could be wrong.
Also the secondlife:// method only works if your SL client is closed as it opens SL client and takes you to location after you login.
_____________________
Garth FairChang ~Cheeky Brit~ ' Have a nice day  ' http://www.fairchang.com
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
03-08-2005 14:11
From: Jesrad Seraph Why not cannon the user across the border ?  Not until 1.6. (llDetectedMass) 
_____________________
---
|
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
|
03-08-2005 14:19
You dont need an llDetectedMass for that. Agents have a constant density, so you can just get their volume.
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
03-08-2005 14:23
Fair enough, but don't attachments also add to the count - or am I totally wrong here? 
_____________________
---
|
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
|
03-08-2005 15:01
The sit-hack teleport was throttled some time back to stop it from ever crossing a sim border.
_____________________
~ Tiger Crossing ~ (Nonsanity)
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
03-08-2005 15:05
Not so sure about that Tiger. I tried this under the present patch ohh... two days ago? I ended up with the "empty sim" problem during two of my tests and had to relog.  If this is what you mean, then either it's not a really good fix - or it's a valid bug.
_____________________
---
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
03-08-2005 15:50
The sit hack should be closed. The reason: There is something heinously wrong with how physics works on avatars when they sit on an object. While it's transparent to the user it's not to the physics engine. The sit hack perturbs this. If you care about your sim, you shouldn't use it. I could say more on this issue, as it has been a known bug for 7 months, but i'll wait till 1.7 to blow the whistle.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
03-08-2005 16:04
Can you extrapolate on this, Strife? I generally do not use the "sithack" for most of my teleporters (I use physical movers), BUT in a few of my private ones I find it convenient. It never struck me that I should check Sim Stats for sit teleports. 
_____________________
---
|
Darwin Appleby
I Was Beaten With Satan
Join date: 14 Mar 2003
Posts: 2,779
|
03-08-2005 16:25
Sure you can. llDetectedVolume would do the trick just fine. You would, litterally, cannon them across. Of course this would only work if there were sims in between, but I set up something like this a while ago and it worked. Let's say my volume is 100 (pretty number) and in order to get me to the next sim you need to push me <10,10,10> (we're just pretending). So for some guy that's 120 in volume, it would be <12,12,12>. You could make a pretty simple calculation for the script to launch him with that velocity.
_____________________
Touche.
|
McWheelie Baldwin
Registered User
Join date: 9 Apr 2004
Posts: 154
|
03-10-2005 12:46
From: Tiger Crossing The sit-hack teleport was throttled some time back to stop it from ever crossing a sim border. From: Jeffrey Gomez Not so sure about that Tiger. I tried this under the present patch ohh... two days ago? I ended up with the "empty sim" problem during two of my tests and had to relog.
If this is what you mean, then either it's not a really good fix - or it's a valid bug. This sit-hack will still cross sim borders. For somewhat more reliable results, don't automatically unsit the avatar, instead IM them after a few seonds and let them know they should stand up. This seems to produce more reliable sit-hack teleports across sim borders. It's still not pretty, and I don't recommend it, but it was working as I described earlier this week. McW
|
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
|
03-10-2005 22:37
From: Darwin Appleby Sure you can. llDetectedVolume would do the trick just fine. You would, litterally, cannon them across. Of course this would only work if there were sims in between, but I set up something like this a while ago and it worked. Let's say my volume is 100 (pretty number) and in order to get me to the next sim you need to push me <10,10,10> (we're just pretending). So for some guy that's 120 in volume, it would be <12,12,12>. You could make a pretty simple calculation for the script to launch him with that velocity. If you're doing this with llPushObject, you'll need to compensate for the distance between the pusher and the pushee. Since the push force decreases as the third power of distance, you'll want to make sure the victim isn't moving very fast, so the measured distance will remain valid between when it's calculated and when you apply the push.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
|
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
|
03-11-2005 12:05
From: Jeffrey Gomez Fair enough, but don't attachments also add to the count - or am I totally wrong here?  Attachments have zero mass.
_____________________
Prim Composer for 3dsMax -- complete offline builder for prims and sculpties in 3ds Max http://liferain.com/downloads/primcomposer/
Hierarchical Prim Archive (HPA) -- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools. https://liferain.com/projects/hpa
|
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
|
Sidetrack TP script
03-11-2005 14:47
Here's my attempt at this. This works better than a normal sit TP across sim boundaries, but is still not completely reliable. // SideTrack TP // Version 0.23
// Copyright 2005 by Shack Dougall
// this script is distributed under the terms // of the GNU General Public License // http://www.gnu.org/licenses/gpl.txt
// please do not sell this script or an object that contains // a script that is substantially based on this.
// Instructions // Put this script in an object which contains a landmark named // "destination". If you add the landmark after the script, don't // forget to reset the script. You may also need to reset the // script after moving or rotating the object. // // The landmark determines where the teleport will go. // // If it worked perfectly, it would take you to any destination with // a straight line path between them. It can't cross void space. // // However, it doesn't work perfectly. :-) // Problems I've seen. // 1) sometimes unsits AV prematurely on a sim boundary. // 2) sometimes screws up real teleports. E.g., everything seems // okay after the Sidetract TP, but then a Teleport Home doesn't // work properly.
string LANDMARK_NAME = "destination"; string SIT_TEXT = "Teleport"; string THANK_YOU = "Thank You for using SideTrack TP! \nIM Shack Dougall for more information."; string DEPARTURE_MESSAGE = "You will automatically stand at your destination.\n Enjoy your ride!";
float STEP_SIZE = 10.0; float MAX_TP_DIST = 300.0;
// minimum height above ground level -- keep us above no script zones float MIN_Z = 50.0;
list startPos; list endPos;
// jumpPoint is the location in the target sim to which we will // move the teleporter before allowing the sit mechanism to take // the avatar the rest of the way. list jumpPoint;
// the number of times that deltaVector needs to be added to // the startPos to get us to the jumpPoint integer jumpCount;
list currPos;
vector deltaVector;
vector lastRegion;
// returns the region corner of the global coord vector regionCorner( list globalCoord ) { return llList2Vector( globalCoord, 0 ); }
// returns the global coord that represents the region corner list regionCornerGlobal( list globalCoord ) { return globalCoord( regionCorner(globalCoord), ZERO_VECTOR ); }
vector localCoord( list globalCoord ) { return llList2Vector( globalCoord, 1 ); }
list globalCoord( vector regionCorner, vector localCoord ) { return [regionCorner, localCoord]; }
//sets the current region. setCurrPos() { vector currRegion = llGetRegionCorner(); lastRegion = currRegion; currPos = globalCoord( currRegion, llGetPos() ); }
// return the global coords of the first point along the deltaVector // that is in the target sim. list calcJumpPoint() { vector targetRegion = regionCorner( endPos ); list tempPos = startPos; jumpCount = 0; while ( targetRegion != regionCorner( tempPos ) ) { // TODO this loop won't terminate in all cases jumpCount++; vector offset = localCoord(tempPos) + deltaVector; tempPos = convertCornerAndOffsetToGlobal( regionCorner(tempPos), offset ); } // if jumpCount is 0 then it is a normal teleport. if (jumpCount == 0) return startPos; // this is a hack, need to do this one more time jumpCount++; vector offset = localCoord(tempPos) + deltaVector; tempPos = convertCornerAndOffsetToGlobal( regionCorner(tempPos), offset );
//hack vector localJump = localCoord(tempPos); vector tripDelta = calcDeltaVector( startPos, tempPos ); localJump.z = MIN_Z + llGround( tripDelta ); return globalCoord( regionCorner(tempPos), localJump ); }
//Returns the displacement vector between two global coordinates. //That is, returns the vector you need to add to the start location to get the //destination location. //dReg and dPos = destRegion and destPos //sReg and sPos = startRegion and startPos vector calcDeltaVector( list startPos, list endPos ) { // do the region subtraction separately from coords to preserve precision vector regionDelta = regionCorner(endPos) - regionCorner(startPos); vector coordsDelta = localCoord(endPos) - localCoord(startPos); return regionDelta + coordsDelta; }
clearSitTarget() { llSitTarget( ZERO_VECTOR, ZERO_ROTATION ); llSetSitText(""); }
//Stores our destination and calculates the initial deltaVector that will //get us there. Sets the IN_TRANSIT flag. Don't call this directly. setDestination( list global ) { endPos = global; llSay(0, "startPos = " + (string) startPos ); llSay( 0, "endPos = " + (string) endPos ); // Calculate the total displacement vector // then, normalize it to get a unit vector (vector of length 1) // then, multiply it by the STEP_SIZE to get a displacement vector of // length STEP_SIZE deltaVector = calcDeltaVector( startPos, endPos ); deltaVector.z = 0; // we don't care about z, that's mandated by ground height. deltaVector = STEP_SIZE * llVecNorm(deltaVector);
jumpPoint = calcJumpPoint(); vector sitTarget = calcDeltaVector( jumpPoint, endPos ); float tpDist = llVecMag( sitTarget ); if (tpDist > MAX_TP_DIST) { clearSitTarget(); llSay( 0, "Sorry, out of TP range. IM Shack Dougall for assistance." ); return; } sitTarget = sitTarget * (ZERO_ROTATION / llGetRot()); llSay(0, "Sittarget = " + (string) sitTarget); llSitTarget( sitTarget, ZERO_ROTATION / llGetRot() ); llSetSitText( SIT_TEXT ); }
//Returns the distance to between two global coordinates. float distance( list startPos, list endPos ) { vector curDelta = calcDeltaVector( startPos, endPos ); return llVecMag(curDelta); }
// Takes a regionCorner and an offset relative to that and returns // a global coord. If offset puts the result in a different sim, // the resulting global will reflect this. // // One use is to convert a landmark into a global coordinate, since // the landmark returns a local offset that is relative to the region // corner. list convertCornerAndOffsetToGlobal( vector regionCorner, vector offset ) { //llSay( 0, "addOffset(): global = " + (string) global + ", offset = " + (string) offset ); vector globalDisp = regionCorner + offset; vector newRegion = <0,0,0>; vector newCoords = <0,0,offset.z>; newRegion.x = llFloor( globalDisp.x / 256 ) * 256.0; newRegion.y = llFloor( globalDisp.y / 256 ) * 256.0; newCoords.x = globalDisp.x - newRegion.x; newCoords.y = globalDisp.y - newRegion.y; return globalCoord( newRegion, newCoords ); }
changeHeight( float meters, float direction ) { float step_size = direction * STEP_SIZE; vector currPos = llGetPos(); while (meters > STEP_SIZE) { currPos.z += step_size; meters -= STEP_SIZE; llSetPos(currPos); } currPos.z += meters * direction; llSetPos(currPos); }
moveToHeight( float z ) { vector pos = llGetPos(); if (z < pos.z) changeHeight( pos.z - z, -1.0 ); else changeHeight( z - pos.z, 1.0 ); }
float max( float one, float two ) { if ( one > two ) return one; else return two; }
moveTowardTarget( vector offset ) { vector pos = llGetPos(); float groundHeight = llGround( offset ); float minHeight = 5*MIN_Z + groundHeight; if (pos.z < minHeight) changeHeight( minHeight - pos.z, 1.0 ); llSetPos( llGetPos() + offset ); vector currRegion = llGetRegionCorner(); if (lastRegion != currRegion) { // region has changed lastRegion = currRegion; llSleep(1.0); } }
// uses setPos to move the teleporter the jump distance // if direction is 1, we move to the jumpPoint. // if direction is -1, we move back to the startpos. moveJumpDistance( float direction ) { integer tempCount = 0; vector tempPos; vector offset = deltaVector * direction; while (tempCount < jumpCount) { moveTowardTarget( offset ); tempCount++; } float targetHeight; if ( direction == 1.0 ) targetHeight = llGround(ZERO_VECTOR) + MIN_Z; else { vector localStart = localCoord(startPos); targetHeight = localStart.z; } moveToHeight( targetHeight ); }
reset() { llSay( 0, "resetting..." ); // clear the sit target until we've initialized clearSitTarget(); // get current location setCurrPos(); startPos = currPos;
// load the destination from the landmark llRequestInventoryData( LANDMARK_NAME ); }
TellRider( key avatar, string message ) { llInstantMessage( avatar, message ); }
teleport( key avatar ) { if (jumpCount > 0) { llSetAlpha(0.0, ALL_SIDES); //TellRider( avatar, DEPARTURE_MESSAGE); llSleep(2.0); //a pause is necessary. moveJumpDistance( 1.0 ); } llSleep(0.1); llUnSit(avatar); if (jumpCount > 0) { llSleep(5.0); TellRider( avatar, THANK_YOU); moveJumpDistance( -1.0 ); llSetAlpha(1.0, ALL_SIDES); } }
default { state_entry() { reset(); } on_rez( integer param ) { reset(); }
changed(integer change) { key avatar = llAvatarOnSitTarget(); if ((change & CHANGED_LINK) && (avatar != NULL_KEY)) { teleport( avatar ); } } dataserver( key query_id, string data ) { // this should be data for an llRequestInventoryData call for a landmark vector rCoords = (vector) data; list global = convertCornerAndOffsetToGlobal( regionCorner(startPos), rCoords ); vector lmRegion = llList2Vector( global, 0 ); vector lmCoords = llList2Vector( global, 1 ); setDestination( global ); llSay( 0, "Ready." ); } }
_____________________
Prim Composer for 3dsMax -- complete offline builder for prims and sculpties in 3ds Max http://liferain.com/downloads/primcomposer/
Hierarchical Prim Archive (HPA) -- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools. https://liferain.com/projects/hpa
|