integer llGetRegionFlags()
Returns a
bitfield specifying the
region flags (
REGION_FLAG_*) for the region the object is in.
Flag | Hex | Value | Description |
REGION_FLAG_ALLOW_DAMAGE | 0x1 | 1 | if a region is entirely damage enabled |
REGION_FLAG_FIXED_SUN | 0x10 | 16 | if a region has a fixed sun position |
REGION_FLAG_BLOCK_TERRAFORM | 0x40 | 64 | if a region terraforming disabled |
REGION_FLAG_SANDBOX | 0x100 | 256 | if a region is a sandbox |
REGION_FLAG_DISABLE_COLLISIONS | 0x1000 | 4096 | if a region has disabled collisions |
REGION_FLAG_DISABLE_PHYSICS | 0x4000 | 16384 | if a region has disabled physics |
REGION_FLAG_BLOCK_FLY | 0x80000 | 524288 | if a region blocks flying |
REGION_FLAG_ALLOW_DIRECT_TELEPORT | 0x100000 | 1048576 | if a region allows direct teleports. |
REGION_FLAG_RESTRICT_PUSHOBJECT | 0x400000 | 4194304 | if a region restricts llPushObject |
Parcel settings may override the region's settings.
llGetParcelFlags can be used to determine these settings on a parcel-by-parcel basis.
Example:
integer region_flags = llGetRegionFlags();
if (region_flags & REGION_FLAG_ALLOW_DAMAGE)
llOwnerSay("This region is damage enabled!");
if (region_flags & REGION_FLAG_FIXED_SUN)
llOwnerSay("This regions sun doesn't move!");
if (region_flags & REGION_FLAG_BLOCK_TERRAFORM)
llOwnerSay("This region does not allow terraforming!");
if (region_flags & REGION_FLAG_SANDBOX)
llOwnerSay("This region is a sandbox!");
if (region_flags & REGION_FLAG_DISABLE_COLLISIONS)
llOwnerSay("This region currently blocks non-agent collisions!");
if (region_flags & REGION_FLAG_DISABLE_PHYSICS)
llOwnerSay("This region currently blocks all physics!");
if (region_flags & REGION_FLAG_BLOCK_FLY)
llOwnerSay("This region blocks flying!");
if (region_flags & REGION_FLAG_ALLOW_DIRECT_TELEPORT) {
llOwnerSay("This region follows P2P rules!");
} else {
llOwnerSay("This region uses a telehub!");
}
if (region_flags & REGION_FLAG_RESTRICT_PUSHOBJECT)
llOwnerSay("This region restricts llPushObject!");
Functions |
Simulator