# /playsound

## Syntax

`playsound <sound> (<targets>|<pos>) [<volume>] [<pitch>] [<maxDistance>]`

## Arguments

`<sound>` String

Specifies the sound to play. Should be the filename of a sound (minus the extension), basically the same thing used for `minetest.sound_play`

`<targets>` Selector

Specifies the entities at whose position the sound will play.

`<pos>` Position

Specifies the position to play the sounds from.

`<volume>` Number

Specifies the value by which the volume will be multiplied. 1 is normal, 0.5 is half, 2 is double.

`<pitch>` Number

Specifies the value by which the pitch will be multiplied. 1 is normal, 0.5 is an octave down, 2 is an octave up.

`<maxDistance>` Number

The maximum distance from `<pos>` or `<targets>` at which the sound can still be heard.

## Examples

To play the sound of TNT igniting 3 nodes behind the nearest player:

`/execute as @p at @s run playsound tnt_ignite ^ ^ ^-3`

## History

| Version | Action             |
| ------- | ------------------ |
| v1.0    | Added `/playsound` |


---

# 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://thepython10110.gitbook.io/better-commands/commands/playsound.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.
