# CustomAudio

This module allows custom items to play a specified audio clip whenever a configured player event occurs. It provides precise control over the audio file, volume, and audible distance, making custom items more interactive based on player actions.

### Configuration

| Value                | Description                                                                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `Trigger`            | Defines the player event(s) that will cause the audio to play. This is a flags enum, meaning multiple events can be combined (e.g., \`OnUse |
| `AudioPath`          | The relative path to the audio file that should be played. This path is relative to the `UncomplicatedCustomItems` plugin's data directory. |
| `MaxAudibleDistance` | A floating-point number specifying the maximum distance in meters from the player's position at which the audio can be heard.               |
| `MaxAudibleDistance` | A floating-point number specifying the radius around the source position that will hear the audio at full volume in meters.                 |
| `SoundVolume`        | A floating-point number representing the volume of the audio clip. A value of `1.0` is full volume.                                         |

### Example

```yaml
custom_modules:
  CustomAudio:
  - Trigger: OnUse | OnDropped
    AudioPath: CustomItems/Sounds/MysteriousSound.ogg # Path to your audio file
    AudibleDistance: 20.0 # Can be heard up to 20 meters away
    SoundVolume: 0.7 # Plays at 70% volume
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uci.ucserver.it/uncomplicatedcustomitems/prerelease-content/custommodules/customaudio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
