integer llGetParcelFlags(vector pos)
Returns a
bitfield specifying the
parcel flags (
PARCEL_FLAG_*) for the parcel under the
position pos.
Flag | Hex | Value | Description |
PARCEL_FLAG_ALLOW_FLY | 0x1 | 1 | find if a parcel allows flying |
PARCEL_FLAG_ALLOW_SCRIPTS | 0x2 | 2 | find if a parcel allows outside scripts |
PARCEL_FLAG_ALLOW_LANDMARK | 0x8 | 8 | find if a parcel allows landmarks to be created |
PARCEL_FLAG_ALLOW_TERRAFORM | 0x10 | 16 | find if a parcel allows anyone to terraform the land |
PARCEL_FLAG_ALLOW_DAMAGE | 0x20 | 32 | find if a parcel allows damage |
PARCEL_FLAG_ALLOW_CREATE_OBJECTS | 0x40 | 64 | find if a parcel allows anyone to create objects |
PARCEL_FLAG_USE_ACCESS_GROUP | 0x100 | 256 | find if a parcel limits access to a group |
PARCEL_FLAG_USE_ACCESS_LIST | 0x200 | 512 | find if a parcel limits access to a list of residents |
PARCEL_FLAG_USE_BAN_LIST | 0x400 | 1024 | find if a parcel uses a ban list, including restricting access based on payment info |
PARCEL_FLAG_USE_LAND_PASS_LIST | 0x800 | 2048 | find if a parcel allows passes to be purchased |
PARCEL_FLAG_LOCAL_SOUND_ONLY | 0x8000 | 32768 | find if a parcel restricts spatialized sound to the parcel |
PARCEL_FLAG_RESTRICT_PUSHOBJECT | 0x200000 | 2097152 | find if a parcel restricts llPushObject |
PARCEL_FLAG_ALLOW_GROUP_SCRIPTS | 0x2000000 | 33554432 | find if a parcel allows scripts owned by group |
PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS | 0x4000000 | 67108864 | find if a parcel allows group object creation |
PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY | 0x8000000 | 134217728 | find if a parcel allows objects owned by any user to enter |
PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY | 0x10000000 | 268435456 | find if a parcel allows with the same group to enter |
Example Usage:
// Parcel flags for land the object is currently over.
integer parcelFlags = llGetParcelFlags(llGetPos());
if (parcelFlags & PARCEL_FLAG_ALLOW_FLY)
llOwnerSay("This parcel allows flying.");
Example test script to see that this function works in the current version of Second Life:
// Show all the parcel flags for land the object is currently over.
default
{
state_entry ()
{
integer Parcel_Flags = llGetParcelFlags (llGetPos ());
if (PARCEL_FLAG_ALLOW_FLY & Parcel_Flags)
{
llOwnerSay ("Parcel allows flying.");
}
if (PARCEL_FLAG_ALLOW_SCRIPTS & Parcel_Flags)
{
llOwnerSay ("Parcel allows outside scripts.");
}
if (PARCEL_FLAG_ALLOW_TERRAFORM & Parcel_Flags)
{
llOwnerSay ("Parcel allows terraforming.");
}
if (PARCEL_FLAG_ALLOW_DAMAGE & Parcel_Flags)
{
llOwnerSay ("Parcel allows damage.");
}
if (PARCEL_FLAG_ALLOW_CREATE_OBJECTS & Parcel_Flags)
{
llOwnerSay ("Parcel allows creating objects.");
}
if (PARCEL_FLAG_USE_ACCESS_GROUP & Parcel_Flags)
{
llOwnerSay ("Parcel limits access to a group.");
}
if (PARCEL_FLAG_USE_ACCESS_LIST & Parcel_Flags)
{
llOwnerSay ("Parcel limits access to a list of residents .");
}
if (PARCEL_FLAG_USE_BAN_LIST & Parcel_Flags)
{
llOwnerSay ("Parcel uses a ban list.");
}
if (PARCEL_FLAG_USE_LAND_PASS_LIST & Parcel_Flags)
{
llOwnerSay ("Parcel allows passes to be purchased.");
}
if (PARCEL_FLAG_LOCAL_SOUND_ONLY & Parcel_Flags)
{
llOwnerSay ("Parcel restricts spatialised sound to the parcel.");
}
if (PARCEL_FLAG_RESTRICT_PUSHOBJECT & Parcel_Flags)
{
llOwnerSay ("Parcel restricts llPushObject.");
}
}
touch_end (integer n)
{
llResetScript ();
}
}
Also see
llGetRegionFlags.
Functions |
Land