Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llOverMyLand not working for groups?

Jiminy Roo
Registered User
Join date: 25 Dec 2004
Posts: 42
07-03-2005 01:44
Hello there. For a gadget I am about to release, A server needs to check if a key is over its land. This is all very easy, until it is on group land. I have tried deeding the object to the group of the land, and It still will not detect that the key is on group land. (When it clearly is)

Is this function broken, or am I doing something wrong?
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
07-03-2005 02:43
I just went in world to test and make sure. It does work if the object is deeded to a group and over group owned land. The wiki says it does as well.

integer llOverMyLand(key id) Returns TRUE if id is over land owned by the script owner, otherwise returns FALSE. This also works for group land, assuming the object is deeded to the group. It will not work if the object is not deeded, not even if owned by a member or officer in the group. The object itself needs to be deeded.

Maybe you should make sure u didnt just click share with group, you need to click deed to group as well
Here is the code i used to test it:
CODE
default
{
state_entry()
{
}

touch_start(integer total_number)
{
if(llOverMyLand(llGetKey())==TRUE)
{
llSetText("TRUE",<1,1,1>,1);
}
else
{
llSetText("FALSE",<1,1,1>,1);
}
}
}
_____________________
Moonshine Herbst
none
Join date: 19 Jun 2004
Posts: 483
07-03-2005 03:06
You can use llGetLandOwnerAt:
CODE

// Get key for land owner at object's current position:
key GroupKey=llGetLandOwnerAt(llGetPos());

// To check if a detected key is over the group's land, do this:
if (llGetLandOwnerAt(llDetectedPos(0)) == GroupKey)
{
//Do something
}

This should work both on group and private land.
http://secondlife.com/badgeo/wakka.php?wakka=llGetLandOwnerAt