---
name: "playSound3D"
type: command
status: ok
groups: ["Sounds"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/playSound3D
revid: 379065
updated: 2026-09-24T20:28:32Z
---

# playSound3D

*Command · Sounds · Arma 3 v0.50*

Locality: arguments **global** · effect **global**

## Description

Plays positional sound with given *filename* on every computer on network. To stop the sound use [stopSound](../commands/stopSound.md)

## Syntax

```sqf
playSound3D [filename, soundSource, isInside, soundPosition, volume, soundPitch, distance, offset, local, loop]
```

**Parameters:**

- `filename`: [String](../topics/String.md) - see Arma 3: Sound Files for available file names or [#Example 3](../commands/playSound3D.md#example-3) to use mission files

  > [!IMPORTANT]
  > Since Arma 3 v2.10 the file name can start with a leading backslash `**\**a3\...`.
  >
  > However a leading backslash must **not** be used for an **addon** sound file.
- `soundSource`: [Object](../topics/Object.md) - the object emitting the sound. If *soundPosition* below is specified this parameter is ignored
- `isInside`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) - [true](../commands/true.md) to simulate a sound played inside a building or similar
- `soundPosition`: [PositionASL](../topics/Position.md#positionasl) - (Optional, default [nil](../commands/nil.md)) position for sound emitter, overrides *soundSource*. [Object](../topics/Object.md) is also supported (see note below). Since Arma 3 v2.24 use [nil](../commands/nil.md) to skip this param

  > [!NOTE]
  > If a following parameter has to be used, simply use `getPosASL _soundSource` for *soundPosition* instead of `_soundSource` for *soundSource*.

  > [!IMPORTANT]
  > This parameter also takes [Object](../topics/Object.md) but their [AGL](../topics/Position.md#positionagl) position is used instead of [ASL](../topics/Position.md#positionasl) resulting in sound source being underground if they're above ground, always use [PositionASL](../topics/Position.md#positionasl) instead.
- `volume`: [Number](../topics/Number.md) - (Optional, default 1) sound volume. A value greater than 5 gets capped
- `soundPitch`: [Number](../topics/Number.md) - (Optional, default 1)
  - 1.0 → normal
  - 0.5 → Darth Vader
  - 2.0 → Chipmunks
- `distance`: [Number](../topics/Number.md) - (Optional, default 0) how far the sound is audible, in meters. `0` means no maximum distance
- `offset`: [Number](../topics/Number.md) - (Optional, default 0) offset in seconds. Same as with [playMusic](../commands/playMusic.md) (ignored if sound is set to play repeatedly, see 'loop') *(since arma3 2.00)*
- `local`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) if [true](../commands/true.md) the sound will not be broadcast over network *(since arma3 2.06)*
- `loop`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) if [true](../commands/true.md) the sound will repeat indefinitely. In MP, requires 'local' to be set to [true](../commands/true.md). Use [stopSound](../commands/stopSound.md) to stop. *(since arma3 2.22)*

**Returns:** [Number](../topics/Number.md) - id of the sound (0..65535) (was [Nothing](../topics/Nothing.md) before Arma 3 v2.12)

## Examples

### Example 1

```sqf
playSound3D ["A3\Sounds_F\sfx\blip1.wss", player];
```

### Example 2

```sqf
playSound3D ["A3\Sounds_F\sfx\blip1.wss", player, false, getPosASL player, 1, 1, 0];
```

### Example 3

```sqf
playSound3D [getMissionPath "mySound.ogg", player]; // to play a mission directory sound
```

### Example 4

Sound file extension must be specified even if a config entry has none:

```sqf
playSound3D ["A3\Sounds_F\sfx\alarm_independent", player];        // no sound
playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", player];    // alarm
```

### Example 5

Example 2 from Arma 3 v2.24 

```sqf
playSound3D ["A3\Sounds_F\sfx\blip1.wss", player, false, nil, 1, 1, 0];
```

## See also

[say3D](../commands/say3D.md) · [playSound](../commands/playSound.md) · [say2D](../commands/say2D.md) · [say](../commands/say.md) · [createSoundSource](../commands/createSoundSource.md) · [setRandomLip](../commands/setRandomLip.md) · [getMissionPath](../commands/getMissionPath.md) · [playSoundUI](../commands/playSoundUI.md) · [stopSound](../commands/stopSound.md)

## Community notes

**Killzone_Kid** — 2014-09-26

Currently, [playSound3D](../commands/playSound3D.md) is not JIP compatible, so joining players will not hear the sound if is started before and is still playing when player joins.

---

**Killzone_Kid** — 2014-11-08

When object is supplied but not a position, the position is taken from object, otherwise the position is taken from supplied position. That doesn't mean that when position is taken from object it is going to follow object when it changes position. The sound is generated at object position and it stays there.

One other important note: If *soundSource* param is [objNull](../commands/objNull.md) then this command develops the same bug with first person view as [createSoundSource](../commands/createSoundSource.md) and [say3D](../commands/say3D.md). If *soundSource* is [player](../commands/player.md) then the bug is inverted. It seems that passing [vehicle](../commands/vehicle.md) [player](../commands/player.md) as *soundSource* param is the only way to make it behave correctly when vehicles involved.

---

**R3vo** — 2020-10-07

The sound will be distorted according to the <https://en.wikipedia.org/wiki/Doppler_effect> when passing by the sound source quickly.

---

**Hypoxic125** — 2023-05-14

Wait for sound to end:

```sqf
private _sound = playSound3D ["A3\Sounds_F\sfx\blip1.wss", player];
waitUntil { soundParams _sound isEqualTo [] };
```

<sub>Source: [BI Community Wiki — playSound3D](https://community.bistudio.com/wiki/playSound3D) (revision 379065).</sub>
