# SCRIPTED

*LSL constant*

```lsl
integer SCRIPTED = 0x8;
```

Constant groups: [DetectType](/constants/groups/DetectType/)

If it is contained in the result of [llDetectedType](/functions/llDetectedType/)(), it means what was detected has at least one active script.

If it is used as a filter of [llSensor](/functions/llSensor/)() or [llSensorRepeat](/functions/llSensorRepeat/)(), it will search for objects that has any script, which is doing anything in simulator just now.

## See also

### Constants

|

<table>
	<tr>
		<th colspan="2">**Flag Mask**</th>
		<th>**Description ([llDetectedType](/functions/llDetectedType/)())**</th>
		<th>**Description ([llSensor](/functions/llSensor/)() and [llSensorRepeat](/functions/llSensorRepeat/)() mask)**</th>
	</tr>
	<tr>
		<td>[AGENT_BY_LEGACY_NAME](/constants/AGENT_BY_LEGACY_NAME/)</td>
		<td>0x1</td>
		<td>Agents</td>
		<td>This is used to find agents by [legacy name](https://wiki.secondlife.com/wiki/Category:LSL_Avatar/Name).</td>
	</tr>
	<tr>
		<td>[AGENT](/constants/AGENT/)</td>
		<td>0x1</td>
		<td>Agents</td>
		<td>This is also used to find agents by [legacy name](https://wiki.secondlife.com/wiki/Category:LSL_Avatar/Name), and is functionally identical to [AGENT_BY_LEGACY_NAME](/constants/AGENT_BY_LEGACY_NAME/)</td>
	</tr>
	<tr>
		<td>[AGENT_BY_USERNAME](/constants/AGENT_BY_USERNAME/)</td>
		<td>0x10</td>
		<td>*Reserved*</td>
		<td>This is used to find agents by [username](https://wiki.secondlife.com/wiki/Category:LSL_Avatar/Name).</td>
	</tr>
	<tr>
		<td>[ACTIVE](/constants/ACTIVE/)</td>
		<td>0x2</td>
		<td>Physical tasks. (Physical objects & agents)</td>
		<td>Physical objects that are moving or objects containing an active script. Thus, it is using SL server resources now.</td>
	</tr>
	<tr>
		<td>[PASSIVE](/constants/PASSIVE/)</td>
		<td>0x4</td>
		<td>Non-physical objects.</td>
		<td>Non-scripted or script is inactive and non-physical or, if physical, not moving. Thus, it is not using SL server resources now.</td>
	</tr>
	<tr>
		<td>[SCRIPTED](/constants/SCRIPTED/)</td>
		<td>0x8</td>
		<td>Objects containing any active script.</td>
		<td>Objects that has any script, which is doing anything in simulator just now.</td>
	</tr>
	<tr>
		<td>[DAMAGEABLE](/constants/DAMAGEABLE/)</td>
		<td>0x20</td>
		<td>Objects & agents that are able to process damage.</td>
		<td>Filter for objects in world that have a script with [on_damage](/events/on_damage/) or a [final_damage](/events/final_damage/) event (able to process damage)</td>
	</tr>
</table>

| [llDetectedType](/functions/llDetectedType/)() | Scripted | Not Scripted | Agent Standing | Agent Sitting |
| --- | --- | --- | --- | --- |
| Physical Movement | [SCRIPTED](/constants/SCRIPTED/)) | 2 ([ACTIVE](/constants/ACTIVE/)) | [AGENT](/constants/AGENT/)) | [AGENT](/constants/AGENT/)) |
| Non-Physical | [SCRIPTED](/constants/SCRIPTED/)) | 4 ([PASSIVE](/constants/PASSIVE/)) | 1 ([AGENT](/constants/AGENT/)) | [AGENT](/constants/AGENT/)) |

### Functions

- [llDetectedType](/functions/llDetectedType/)
- [llSensor](/functions/llSensor/)
- [llSensorRepeat](/functions/llSensorRepeat/)

---

*Source: [SCRIPTED](https://wiki.secondlife.com/wiki/SCRIPTED) on the Second Life Wiki. Content from the Second Life Wiki articles SCRIPTED (revision 1185014, 2013-12-12) and Template:LSL Constants Sensor (revision 1217617, 2024-11-07), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/constants/SCRIPTED/
