# llSetStatus

*LSL function*

```lsl
void llSetStatus(integer status, integer value);
```

- `integer status`: Bitmask representing the STATUS_* flag(s) to change.
- `integer value`: Boolean. If TRUE, enables the status; if FALSE, disables it.

- Energy: 10

Sets the object status attributes indicated in the **status**\} mask to **value**

```lsl title="How to use" frame="terminal"
llSetStatus(0, 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.
- Except for [STATUS_BLOCK_GRAB](/constants/STATUS_BLOCK_GRAB/), this only affects the prim the script is in, child prims in linked objects will not be affected.
- Use [STATUS_BLOCK_GRAB_OBJECT](/constants/STATUS_BLOCK_GRAB_OBJECT/) to block grabbing of a link_set.
- Setting [STATUS_PHYSICS](/constants/STATUS_PHYSICS/) fails silently in attached objects. ~ [svc 6549](#svc-6549)
- The [STATUS_ROTATE_X](/constants/STATUS_ROTATE_X/), [STATUS_ROTATE_Y](/constants/STATUS_ROTATE_Y/) and [STATUS_ROTATE_Z](/constants/STATUS_ROTATE_Z/) flags all require that the object first be made physical to have any effect.

## Examples

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

```lsl
default
{
    state_entry()
    {
        llSetStatus( STATUS_DIE_AT_EDGE | STATUS_PHYSICS, TRUE);
        llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE);
    }
}
```

</details>

## Known issues

From the issue templates included by the wiki article:

- SVC-6549 (bug): llSetStatus can't change STATUS_PHYSICS of an attachment despite the status being preserved between attach & drop
- 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
- SVC-5723 (fs): New constant STATUS_BLOCK_SIT
- SCR-203 (nf): &lt;code>STATUS_PARCEL_BOUND&lt;/code> status to prevent a physical object from being able to leave the bounds of the current parcel.

## See also

### Functions

- [llGetStatus](/functions/llGetStatus/) — Gets the object status.

---

*Source: [LlSetStatus](https://wiki.secondlife.com/wiki/LlSetStatus) on the Second Life Wiki. Content from the Second Life Wiki articles LlSetStatus (revision 1204717, 2016-10-11), Template:LSL Constants/Status (revision 1210938, 2022-07-22), Template:Issues/SVC-6549 (revision 1111982, 2010-11-21), Template:Issues/SVC-5531 (revision 807252, 2010-03-15), Template:Issues/SVC-1773 (revision 1007742, 2010-08-16), Template:Issues/SVC-4197 (revision 343573, 2009-05-04), Template:Issues/SVC-5723 (revision 876392, 2010-04-23), Template:Issues/SCR-203 (revision 1153780, 2011-09-18) and Template:LSL Function/boolean (revision 1185613, 2013-12-24), CC BY-SA 3.0.*

---

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