# llGetStatus

*LSL function*

```lsl
integer integer llGetStatus(integer status);
```

- `integer status`: Single STATUS_* flag to check.

- Returns: `integer`
- Energy: 10

Returns a boolean integer indicating whether the specified status flag status is enabled for the object.

Returns an [integer](https://wiki.secondlife.com/wiki/integer) equal to the **status** of the object.

```lsl title="How to use" frame="terminal"
integer result = llGetStatus(0);
```

## Specification

<table>
	<tr>
		<td>

			| Constants | Value | Default | Description |
			| --- | --- | --- | --- |
			| [STATUS_PHYSICS](/constants/STATUS_PHYSICS/) | 0x001 | [FALSE](/constants/FALSE/) | Object is [physical](https://wiki.secondlife.com/wiki/LSL_Glossary#physical) |
			| [STATUS_ROTATE_X](/constants/STATUS_ROTATE_X/) | 0x002 | [TRUE](/constants/TRUE/) | Can turn along this axis (physical objects only) |
			| [STATUS_ROTATE_Y](/constants/STATUS_ROTATE_Y/) | 0x004 | [TRUE](/constants/TRUE/) | Can turn along this axis (physical objects only) |
			| [STATUS_ROTATE_Z](/constants/STATUS_ROTATE_Z/) | 0x008 | [TRUE](/constants/TRUE/) | Can turn along this axis (physical objects only) |
			| [STATUS_PHANTOM](/constants/STATUS_PHANTOM/) | 0x010 | [FALSE](/constants/FALSE/) | Object is [phantom](https://wiki.secondlife.com/wiki/LSL_Glossary#phantom) |
			| [STATUS_SANDBOX](/constants/STATUS_SANDBOX/) | 0x020 | [FALSE](/constants/FALSE/) | Keep object within 10 meters and in the same region |
			| [STATUS_BLOCK_GRAB](/constants/STATUS_BLOCK_GRAB/) | 0x040 | [FALSE](/constants/FALSE/) | Prevent click-and-drag movement on the root prim |

		</td>
		<td>

			| Constants | Value | Default | Description |
			| --- | --- | --- | --- |
			| [STATUS_DIE_AT_EDGE](/constants/STATUS_DIE_AT_EDGE/) | 0x080 | [FALSE](/constants/FALSE/)[\*](#srae-t) | Delete and do not return object if it goes off world |
			| [STATUS_RETURN_AT_EDGE](/constants/STATUS_RETURN_AT_EDGE/) | 0x100 | [FALSE](/constants/FALSE/) | Return object to owner if it goes off world |
			| [STATUS_CAST_SHADOWS](https://wiki.secondlife.com/wiki/STATUS_CAST_SHADOWS) | 0x200 | [TRUE](/constants/TRUE/) | *not currently used* |
			| [STATUS_BLOCK_GRAB_OBJECT](/constants/STATUS_BLOCK_GRAB_OBJECT/) | 0x400 | [FALSE](/constants/FALSE/) | Prevent click-and-drag movement on all prims in the object |
			| [STATUS_DIE_AT_NO_ENTRY](/constants/STATUS_DIE_AT_NO_ENTRY/) | 0x800 | [FALSE](/constants/FALSE/)[†](#srae-v) | Delete and do not return object if it cannot enter a parcel |

		</td>
	</tr>
	<tr>
		<td colspan="2"><sup>[\*](#srae-s) [STATUS_DIE_AT_EDGE](/constants/STATUS_DIE_AT_EDGE/) - If the object is [rezzed](/categories/rez/) by a script, the default is [TRUE](/constants/TRUE/)</sup></td>
	</tr>
	<tr>
		<td colspan="2"><sup>[†](#srae-u) [STATUS_DIE_AT_NO_ENTRY](/constants/STATUS_DIE_AT_NO_ENTRY/) - [No-copy](https://wiki.secondlife.com/wiki/Permission#copy) objects ignore this flag and remain in-world</sup></td>
	</tr>
</table>

## Caveats

- Status is an object attribute; all prims in an object share the same status.
- [STATUS_BLOCK_GRAB](/constants/STATUS_BLOCK_GRAB/) only really deals with the root prim. Try [STATUS_BLOCK_GRAB_OBJECT](/constants/STATUS_BLOCK_GRAB_OBJECT/) instead.
- Querying for [STATUS_CAST_SHADOWS](https://wiki.secondlife.com/wiki/STATUS_CAST_SHADOWS) always returns [FALSE](/constants/FALSE/) regardless of the setting.
- Only one flag should be specified at a time. As of Second Life Server 2022-09-09.574921, if more than one flag is specified, [STATUS_DIE_AT_NO_ENTRY](/constants/STATUS_DIE_AT_NO_ENTRY/) takes priority, followed by [STATUS_BLOCK_GRAB_OBJECT](/constants/STATUS_BLOCK_GRAB_OBJECT/), [STATUS_DIE_AT_EDGE](/constants/STATUS_DIE_AT_EDGE/), [STATUS_RETURN_AT_EDGE](/constants/STATUS_RETURN_AT_EDGE/), [STATUS_BLOCK_GRAB](/constants/STATUS_BLOCK_GRAB/), [STATUS_SANDBOX](/constants/STATUS_SANDBOX/), [STATUS_ROTATE_Z](/constants/STATUS_ROTATE_Z/), [STATUS_ROTATE_Y](/constants/STATUS_ROTATE_Y/), [STATUS_ROTATE_X](/constants/STATUS_ROTATE_X/), [STATUS_PHANTOM](/constants/STATUS_PHANTOM/), and [STATUS_PHYSICS](/constants/STATUS_PHYSICS/).

## Examples

<details open>
<summary>Example 1</summary>

```lsl
default
{
    touch_start(integer total_number)
    {
        if (llGetStatus(STATUS_PHYSICS))
        {
            llSay(0, "This object is physical");
        }
        else
        {
            llSay(0, "This object is not physical");
        }
    }
}
```

</details>

## Known issues

From the issue templates included by the wiki article:

- SVC-5531 (bug): llGetStatus(STATUS_ROTATE_Z); will not work on child prims on freshly rezzed objects.
- SVC-1773 (bug): STATUS_BLOCK_GRAB only affects individual prims in a linkset
- SVC-4197 (fs): Create STATUS_TRANSLATE\_\* flags for llSetStatus

## See also

### Functions

- [llSetStatus](/functions/llSetStatus/) — Sets the object status.

---

*Source: [LlGetStatus](https://wiki.secondlife.com/wiki/LlGetStatus) on the Second Life Wiki. Content from the Second Life Wiki articles LlGetStatus (revision 1212333, 2022-09-24), Template:LSL Constants/Status (revision 1210938, 2022-07-22), Template:Issues/SVC-5531 (revision 807252, 2010-03-15), Template:Issues/SVC-1773 (revision 1007742, 2010-08-16) and Template:Issues/SVC-4197 (revision 343573, 2009-05-04), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llGetStatus/
