llGetRegionFlags
integer llGetRegionFlags();- Returns
integer- Energy
- 10
Only a small number of flags are actually used; the rest (shown below in strike-through) are always zero. In particular, it is not possible to detect the status of “Allow Land Resell”, “Allow Land Join/Divide”, or “Block Land Show in Search”; nor, obviously, it is possible for a script to detect that “Disable Scripts” has been set.
Returns an integer that is the region flags (REGION_FLAG_*) for the region the object is in.
integer result = llGetRegionFlags();Specification
Section titled “Specification”| Flag | Value | Description |
|---|---|---|
REGION_FLAG_ALLOW_DAMAGE | 0x00000001 | Find if a region is entirely damage enabled |
REGION_FLAG_FIXED_SUN | 0x00000010 | Find if a region has a fixed sun position |
REGION_FLAG_BLOCK_TERRAFORM | 0x00000040 | Find if a region terraforming disabled |
REGION_FLAG_SANDBOX | 0x00000100 | Find if a region is a sandbox |
REGION_FLAG_DISABLE_COLLISIONS | 0x00001000 | Find if a region has disabled collisions |
REGION_FLAG_DISABLE_PHYSICS | 0x00004000 | Find if a region has disabled physics |
REGION_FLAG_BLOCK_FLY | 0x00080000 | Find if a region blocks flying |
REGION_FLAG_ALLOW_DIRECT_TELEPORT | 0x00100000 | Find if a region allows direct teleports |
REGION_FLAG_RESTRICT_PUSHOBJECT | 0x00400000 | Find if a region restricts llPushObject calls |
| 0x00000002 | Can you make landmarks here? | |
| 0x00000004 | Do we allow the home position to be set here? | |
| 0x00000008 | Do we reset the home position when someone teleports away from here? | |
| 0x00000020 | The estate lets parcel owners set their own access (private parcels). Formerly REGION_FLAGS_TAX_FREE, reused in 20171 | |
| 0x00000080 | Can’t release, sell, or buy land. | |
| 0x00000200 | Parcels may set their own environment. Formerly REGION_FLAGS_NULL_LAYER, reused in 20181 | |
| 0x00000400 | Region allows land reselling | |
| 0x00000800 | Region allows posting of classified ads | |
| 0x00002000 | ||
| 0x00008000 | ||
| 0x00010000 | ||
| 0x00020000 | ||
| 0x00040000 | ||
| 0x00200000 | Is there an administrative override on scripts in the region at the moment. This is the similar skip scripts, except this flag is persisted in the database on an estate level. | |
| 0x00800000 | ||
| 0x01000000 | ||
| 0x02000000 | ||
| 0x04000000 | ||
| 0x08000000 | Parcel access limits reach a higher ceiling, so restricted parcels can’t be flown over. Formerly REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER, reused in 20131 | |
| 0x10000000 | ||
| 0x20000000 | ||
| 0x40000000 | ||
| 0x80000000 | Scripted agents are blocked from the estate or region. Formerly REGION_FLAGS_SKIP_MONO_SCRIPTS, reused in 2023. In LSL this bit is the sign bit, so a mask test is flags & 0x80000000, or flags < 01 |
| † | REGION_FLAGS_* are internal and not exposed to the compiler (hence the strike through), despite this their values may be valid in the mask. In other words, there may be no nice name for the constant that the compiler will accept but the values may work. Remember that LL does not support these; they may redefine the flags without notice, this has happened in the past. |
| * | REGION_FLAGS_* flags in red have been removed from the , the values may get reassigned and reused! |
Examples
Section titled “Examples”Example 1
default{ touch_start(integer total_number) { if( llGetRegionFlags() & REGION_FLAG_SANDBOX ) { llOwnerSay("Region is a sandbox."); } else { llOwnerSay("Region is not a sandbox."); } }}History
Section titled “History”- SVN:960 r93583 Branch:Release Saturday, 02 August 2008 REGION_FLAGS_SKIP_MONO_SCRIPTS added.
- 2013, 2017, 2018 and 2023: the viewer reuses four retired bits for BLOCK_FLYOVER, ALLOW_ACCESS_OVERRIDE, ALLOW_ENVIRONMENT_OVERRIDE and DENY_BOTS1
See also
Section titled “See also”Functions
Section titled “Functions”llGetEnv— for region settings that don’t fit in a flagllGetParcelFlagsllRequestSimulatorData
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.
Footnotes
Section titled “Footnotes”-
Viewer
746d768339:llmessage/llregionflags.h:43-92;newview/llestateinfomodel.cpp:75-87;newview/llfloaterregioninfo.cpp:515↩ ↩2 ↩3 ↩4 ↩5