Emit a sound
sound_emitPlays a sound once at a world position or from an entity, with controls for pitch, volume, level, DSP, and realm; returns immediately with emission details.
Instructions
Plays a sound once, from a position (global EmitSound) or from an entity (Entity:EmitSound, it follows the entity), on CHAN_AUTO. Pass pos or ent. name is a soundscript name or a path under sound/ (e.g. "ambient/alarms/klaxon1.wav"); error not_found if neither exists. Server realm by default (networked to the client); realm client plays it only locally. Returns at once: {emitted, pos or ent, level, pitch, volume, dsp}. To see what the engine and the hooks received, run sound_trace meanwhile. Example: {"name": "ambient/alarms/klaxon1.wav", "pos": [0, 0, 64], "level": 90}. Needs a loaded map (map_load): the server and client realms do not exist at the main menu.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "sound_emit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dsp | No | DSP preset, default 0. | |
| ent | No | Entity index to play it from (or pos). | |
| pos | No | Where to play it, [x, y, z] in Hammer units (or ent). | |
| name | Yes | Soundscript name or path relative to sound/. | |
| level | No | Sound level in dB, default 75. | |
| pitch | No | Default 100. | |
| realm | No | Realm (default server). | |
| volume | No | Default 1. | |
| instance | No | Optional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dsp | No | ||
| ent | No | ||
| pos | No | ||
| next | No | ||
| note | No | ||
| level | No | ||
| pitch | No | ||
| volume | No | ||
| emitted | Yes | ||
| warning | No | ||
| next_call | No | ||
| answered_by | No | ||
| truncated_note | No | ||
| version_warning | No |