|
Rachel Corleone
Registered User
Join date: 9 Oct 2006
Posts: 21
|
09-10-2008 22:14
I'm trying to find a way of having a script detect when two different locations are in different parcels. I've been using llGetParcelDetails(), llGetParcelFlags(), etc.; but there are cases when these functions would return the same data for different parcels.
For example, this would often happen when a larger parcel has been subdivided into parcels of the same size by a developer: all the details would be the same for each parcel.
It would be wonderful if parcels had keys, like everything else in SL! But even if they do, there seems to be no LSL function that will return them.
Any ideas?
Rachel
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
09-10-2008 22:26
|
|
Rachel Corleone
Registered User
Join date: 9 Oct 2006
Posts: 21
|
09-11-2008 09:58
I think I figured out how to do it with a scripted bot. Here's the pseudo-code for the script:
Move to location X; Set C1 = llGetParcelPrimCount( location Y ); Move to location Y; Set C2 = llGetParcelPrimCount( location Y ); If C1 == C2 then same parcel; else different parcel;
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
09-11-2008 10:14
From: Rachel Corleone I think I figured out how to do it with a scripted bot. Here's the pseudo-code for the script:
Move to location X; Set C1 = llGetParcelPrimCount( location Y ); Move to location Y; Set C2 = llGetParcelPrimCount( location Y ); If C1 == C2 then same parcel; else different parcel; That would work except that SL is a dynamic system, and you can't expect other things to stay stationary and static while your script is at work. Chances of things changing in those 0.2 seconds or so between calls may not be INCREDIBLY high, but they aren't insignificant in general either. Objects move, are rezzed, are deleted, etc. Just keep in mind there is a definite race condition in the logic (much more so than the usual logic that checks parcel details and owner, since those things tend to change a lot less frequently than prim counts).
|