> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Visibility Events

> React to entities detecting players.

Trigger actions when an entity sees a player.

## Configuration

### `on_player_visibility_detection`

Triggers when a player enters an entity's line of sight.

<ResponseField name="entity" type="EntityInstanceEntry">
  The entity performing the detection.
</ResponseField>

<Info>Requires `AnimationExtension` or similar for active AI scanning.</Info>

## Example

<CodeGroup>
  ```yaml Sneak Mechanic theme={null}
  on_player_visibility_detection:
    actions:
      - message_action:
          message: "<red>You have been spotted!"
  ```
</CodeGroup>
