|
Dire Lobo
Registered User
Join date: 20 Dec 2005
Posts: 47
|
04-07-2006 11:07
I'm trying to make the sit target teleport hack work. I have found that when the target lies in a neighboring SIM - even though the total distance of the teleport is like 10 meters - the object's changed() handler is never called. It is my understanding that an avatar sitting on a prim will raise a changed() event. With the sit target set to a location in another sim, the event seems to be called only rarely. The frustrating thing is that when the changed event is raied the av winds up at the right location. It works perfectly. When the changed() handler is not called the av ends up at the edge of a sim or underground, or in the air. To try this out, place this script in any prim and change the target vector to any point on a neighboring sim and set the targetRegCnr to the value returned by llGetRegionCorner() for the sim where the target is located. Then sit on it... I would be indebted to anyone who can find a way around this limitation. Is there another way to effect a simulation of a teleport? Thanks. /////////////////////////////////////////////////////////////////////////////////////////////// // Cross Sim Transporter // // Fails to work most of the time. Works some of the time. // vector target = <28,241,39>; vector targetRegCnr = <264448.00000, 258304.00000, 0.00000>;
default { state_entry() { rotation currRot = llGetRot(); llSitTarget(((target + targetRegCnr) - (llGetPos() + llGetRegionCorner())) / currRot, ZERO_ROTATION/currRot); }
changed(integer change) { llSay(0, "changed event handler called..."); if (change & CHANGED_LINK) { if (llAvatarOnSitTarget() != NULL_KEY) llUnSit(llAvatarOnSitTarget()); } } }
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
04-07-2006 13:05
Sit teleports across sim boundaries are very "iffy". Sometimes iyou get the events, sometimes you don't. I've done the best I can in my Long Distance Teleporter (open source at my stores) but it does warn you about cross-sim targets and you really should limit sit teleports to the same sim.
|
|
Dire Lobo
Registered User
Join date: 20 Dec 2005
Posts: 47
|
04-07-2006 13:18
From: Argent Stonecutter I've done the best I can in my Long Distance Teleporter (open source at my stores) but it does warn you about cross-sim targets and you really should limit sit teleports to the same sim. Can you suggest an alternative method of moving people from a location in one sim to a location in a neighboring sim - the distance is very short, perhaps 30 or 40 meters. Also, I checked out the conspiracy shack/store - couldn't find your Long Dist Teleporter - could you drop it on my perhaps so I can have a look at it? I'd be grateful. Thx. Dire.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
04-07-2006 15:53
From: Dire Lobo Can you suggest an alternative method of moving people from a location in one sim to a location in a neighboring sim - the distance is very short, perhaps 30 or 40 meters. Move the teleporter. At 50 m/s with llSetPos() it'll take less than a second. llRezObject() a new teleporter as soon as it takes off and llDie() the old one so you don't have to worry about the next spod waiting for it to return. changed(integer what) { if(what & CHANGED_LINK) { key passenger = llAvatarOnSitTarget(); if(passenger) { vector target_pos = target_region_pos + target_region_corner - llGetRegionCorner(); vector hop = llVecNorm(target_pos - llGetPos()) * 10; llSetAlpha(0,ALL_SIDES); while(llVecDist(target_region_corner,llGetRegionCorner()) > 0.1) llSetPos(llGetPos() + hop); while(llVecDist(llGetPos, target_region_pos) > 0.1) llSetPos(target_region_pos); llUnSit(passenger); llDie(); } } }
From: someone Also, I checked out the conspiracy shack/store - couldn't find your Long Dist Teleporter - could you drop it on my perhaps so I can have a look at it? I'd be grateful. it's the white ball to the left of the sign. You can also get it at LostFurest dAlliez at about (100,10,520), above the row of "tin can" sales boxes.
|