# User control sound

User Control Sound (UCS) allows you to modify playing sounds parameters or start new sounds depending on user control conditions.

UCS provides fine-grained control over sound behavior in real-time by:

* Modifying **listener parameters** (HDR, LPF) based on camera or selection state;
* Applying **conditional sound logic** via includes and operations;
* Grouping sounds for organized control and activation;
* Supporting both **static** and **dynamic** group outputs;
* Integrating with scripts using the `active` flag.

## Listener Control

The `listener` block defines how UCS modifies the audio listener’s parameters in response to user input or state.

> **Template**&#x20;
>
> ```
> {listener
>     {includes
>         // Conditions that must be met
>     }
>     {operations
>         // Listener parameter modifications
>     }
> }
> ```
>
> * {includes \[...]} : contains conditions (e.g., camera, selection) required to apply the operations block
> * {operations \[...]}: defines parameter modifications such as HDR, LPF, and occlusion.

### Occlusion

Occlusion controls high-frequency dampening of sound:

* **Default value**: `1` (no effect)
* **Range**: `1–10`
* **Higher values** = stronger high-frequency filtering

{% hint style="info" %}
Occlusion works together with the group's **LPF** level. To cancel occlusion, set the LPF level equal to the occlusion value.
{% endhint %}

### HDR

The HDR block modifies how the listener reacts to loud sounds:

* Increasing the **loudness** simulates listener adaptation to intense audio events.
* This is separate from the sound’s own HDR values — the listener’s loudness applies globally when include conditions are met.

{% hint style="info" %}
Listeners Includes and operations examples and description see inside sound/user\_control.set
{% endhint %}

## Group

UCS works with groups. Group is a named set of includes conditions and array of output operations.

To make a sound respond to **User Control Sound (UCS)**, follow these **three steps.**

{% stepper %}
{% step %}
Сreate a named group in the `sound/user_control.set` file.\
Example:

```c
{group hit
    // includes and outputs
}
```

{% endstep %}

{% step %}
Assign this group to the sound inside the `loudness` block, a `folder.set`, or `composite` parameters. \
Example:

```c
{group "hit"}
```

{% endstep %}

{% step %}
For the script commands you must specify the “active” flag.\
Example:

```c
{start_sound "hit/big/metal_hit" active}
{link_sound "move" "vehicle/groundborne/pz1/pz1_tracks" active}
```

{% endstep %}
{% endstepper %}

### Group options

By default the group is static. It means that outputs select only once before start. At all playback time output is set the same.

To update output set by the way of sound playback you must specify a dynamic flag.

{% hint style="info" %}
Group options see inside sound/user\_control.set
{% endhint %}

### Group includes

By default UCS applies outputs for any sound inside a group.

You can Include only required user control options with Includes block.

All includes related to the user player.

{% hint style="info" %}
See parameters specification inside sound/user\_control.set.
{% endhint %}

### Group outputs

Group output is a set of conditions and operations with sound parameters. Depending on static or dynamic groups parameters modify only when sound starts or continuously all the playback time.

{% hint style="info" %}
Output Includes and operations examples and description see inside sound/user\_control.set
{% endhint %}


---

# 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://bestway-1.gitbook.io/documentation/game-settings/user-control-sound.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.
