Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llWarpPos() + Parcel Full.... Any suggestions?

Travis Lambert
White dog, red collar
Join date: 3 Jun 2004
Posts: 2,819
06-21-2007 16:27
Hi!

I'm working on a script that repeatedly sends a box using llWarpPos() to each of the four corners of my mainland sim, the corner parcels I own.

However, some of the land in-between I dont own, and for some reason, instead of 'warping', it seems to get caught up with parcel full messages, never fully making it to its four-corner destinations.

Instead of going from (0,0) to (255,0) to (255,255) to (0,255), I get this instead:

(Starting from (132, 219, 419.88330)........)

Second Life: Can't move object 'Test Box' to { 38.8325, 65.0553, 419.883 } in region Isabel because the parcel is full. Notifications from this region are temporarily deactivated.

I am now at: <0.00000, 0.00000, 419.88330>
I am now at: <70.00000, 0.00000, 419.88330>
I am now at: <75.87228, 8.09422, 419.88330>
I am now at: <58.24808, 65.44740, 419.88330>
I am now at: <0.00000, 0.00000, 419.88330>
...and over, and over.


So - questions....

a) Is there a way I can detect whether the parcel is full before I enter it, and perhaps re-route? (I dont think there is, but figured I'd ask anyway)

b) Any suggestions on how I could re-route in general, to get this box back to the four corners where it belongs when it gets 'stuck'?


Here is the script I'm attempting to use: (damn you, BBCode!):

CODE

integer handle;
integer sleep = 10;
vector start;




glSetPos(vector dest) // dest must be in global coordinates
{
vector prev = dest;
vector pos = llGetRegionCorner() + llGetPos(); // glGetPos() inlined
while ( llVecDist(pos, dest) >= 0.01 && llVecDist(pos, prev) >= 0.01 )
{
integer steps = (integer)llCeil(llVecDist(pos, dest) / 10.0);
if ( steps > 128 ) steps = 128;
list rules = [PRIM_POSITION, dest - llGetRegionCorner()];
integer len = 2;
while ( len < steps )
{
rules += rules;
len += len;
}
rules += llList2List(rules, 0, steps * 2 - len - 1);
llSetPrimitiveParams(rules);
prev = pos;
pos = llGetRegionCorner() + llGetPos(); // glGetPos() inlined
}
}

moveme()
{
glSetPos(llGetRegionCorner() + <0,0,start.z>);
llOwnerSay("I am now at: " + (string) llGetPos());
llSleep(sleep);
glSetPos(llGetRegionCorner() + <255,0,start.z>);
llOwnerSay("I am now at: " + (string) llGetPos());
llSleep(sleep);
glSetPos(llGetRegionCorner() + <255,255,start.z>);
llOwnerSay("I am now at: " + (string) llGetPos());
llSleep(sleep);
glSetPos(llGetRegionCorner() + <0,255,start.z>);
llOwnerSay("I am now at: " + (string) llGetPos());
llSleep(sleep);
}

default
{
state_entry()
{
handle = llListen(8,"","","kill");
}


touch_start(integer total_number)
{
start = llGetPos();

}



link_message(integer sender_num, integer lmnum, string lmstr, key lmid)
{
if (llGetSubString(lmstr,0,4) == "BEGIN")
{

list configparms = llParseStringKeepNulls(lmstr, ["|"], [""]);
sleep = (integer) llList2String(configparms,7);
llSay(0,"Preparing to initiate move cycle in 10 seconds.");
llSleep(10);
while (0==0)
{
moveme();
}
}
}

listen(integer channel, string name, key id, string msg)
{
if (msg == "kill")
{
llDie();
}
}
}




Any suggestions would be much appreciated! :)
_____________________
------------------
The Shelter

The Shelter is a non-profit recreation center for new residents, and supporters of new residents. Our goal is to provide a positive & supportive social environment for those looking for one in our overwhelming world.
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-21-2007 16:36
How 'bout llSetPrimitiveParams([PRIM_TEMP_ON_REZ, TRUE) before the warpPos, and setting it back to FALSE afterwards? (assuming neighboring parcels aren't filling up with temp-rezzed bullets, trying to shoot down your prim! ;) )
Travis Lambert
White dog, red collar
Join date: 3 Jun 2004
Posts: 2,819
06-21-2007 16:39
From: Qie Niangao
How 'bout llSetPrimitiveParams([PRIM_TEMP_ON_REZ, TRUE) before the warpPos, and setting it back to FALSE afterwards? (assuming neighboring parcels aren't filling up with temp-rezzed bullets, trying to shoot down your prim! ;) )


Hrm.... if that works, brilliant workaround! I'll give it a shot! :)

So, Temp On Rez prims avoid parcel full? I suppose that makes sense. I haven't played with that flag in an eternity :D
_____________________
------------------
The Shelter

The Shelter is a non-profit recreation center for new residents, and supporters of new residents. Our goal is to provide a positive & supportive social environment for those looking for one in our overwhelming world.
Travis Lambert
White dog, red collar
Join date: 3 Jun 2004
Posts: 2,819
06-21-2007 16:52
Sadly, It didn't work :(

The output changed a little bit after toggling temp rez as suggested above, but pretty much the same effect (although getting a little farther now):

[16:46] Test Box: I am now at: <0.00000, 0.00000, 419.97830>
[16:47] Can't move object 'Test Box' to { 80, 0, 419.978 } in region Isabel because you are banned from the parcel.
[16:47] Second Life: Can't move object 'Test Box' to { 80, 0, 419.978 } in region Isabel because you are banned from the parcel. Notifications from this region are temporarily deactivated.
[16:47] Test Box: I am now at: <70.00000, 0.00000, 419.97830>
[16:47] Test Box: I am now at: <75.87228, 8.09422, 419.97830>
[16:47] Test Box: I am now at: <0.00000, 255.00000, 419.97830>
[16:48] Test Box: I am now at: <0.00000, 0.00000, 419.97830>
[16:48] Test Box: I am now at: <70.00000, 0.00000, 419.97830>
[16:48] Test Box: I am now at: <75.87228, 8.09422, 419.97830>
[16:49] Test Box: I am now at: <0.00000, 255.00000, 419.97830>
[16:49] Test Box: I am now at: <0.00000, 0.00000, 419.97830>
[16:49] Test Box: I am now at: <70.00000, 0.00000, 419.97830>
[16:50] Test Box: I am now at: <75.87228, 8.09422, 419.97830>


Looks like one of the parcels in-between has an access list, which may be the trouble. Any other ideas? :)
_____________________
------------------
The Shelter

The Shelter is a non-profit recreation center for new residents, and supporters of new residents. Our goal is to provide a positive & supportive social environment for those looking for one in our overwhelming world.
Teddy Qinan
Registered User
Join date: 10 Mar 2007
Posts: 34
Warping an object
06-21-2007 17:55
I have had similar problems. I don't have my code here but here are the problems and solutions, you can work out the code...

The parcel has scripts disabled: Use llScriptDanger() to detect BEFORE you move there. This is only officially effective to 45m AGL, but I stay higher than Ground+60m to be sure.

Avatar entry is banned: Same as above, but I don't remember the height for this one.

Object entry is banned: The best I have worked out for this one is to detect if you made it to your destination and then reroute if you didn't. (This is the most annoying one as it seems to have no height limit)


Feel free to correct any of this if it's wrong. :)
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-21-2007 18:15
From: Teddy Qinan
Object entry is banned: The best I have worked out for this one is to detect if you made it to your destination and then reroute if you didn't. (This is the most annoying one as it seems to have no height limit)
Based on the messages, I suspect this is the immediate problem the OP is encountering. Depending on the geometry involved, maybe it would work to return the prim to some central point of the parcel between each corner traversal. Otherwise, perhaps have the prim traverse the property line, warping to waystations at each inner as well as outer corner.

Wondering: do flying vehicles also encounter the "object entry is banned" problem?
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
06-21-2007 19:52
I've seen sample code for a warp pos that routes around parcels somewhere, I can't recall where though. Probably for the same reasons.