LSL Wiki Mirror 10-5-2006: llOverMyLand

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
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.

Example:
default {
    touch_start(integer num_detected) {
        // check if the touching person is over the script owner's land
        if (llOverMyLand(llDetectedKey(0))) {
            llSay(0, llDetectedName(0) + " is on my land.");
        }    else {
            llSay(0, llDetectedName(0) + " is NOT on my land.");
        }
    }
}

NOTE: This function may return a false positive on an AV that was just ejected from your land into a neighboring sim. (As of June 10, 2006)

NOTE: The false positive condition may be worked around by performing:
if (llOverMyLand(key agent) && llGetAgentInfo(key agent) != 0)
In testing, llGetAgentInfo() appears to reliably return a value of 0 when the agent in question is not in the same sim.

Also useful: llGetLandOwnerAt.


Functions | Land
There is one comment on this page. [Display comments/form]