Arma 3 Scripting

Command in Sounds

playSoundUI

Also available as Markdown and JSON, or read the original wiki page.

Description

Plays given CfgSounds sound or a sound file given by file path through a dedicated UI sound channel unaffected by the global mixer volumes. If the file path is given, the leading slash will be ignored. To stop the sound use stopSound

Syntax

playSoundUI [sound, volume, soundPitch, isEffect, offset, loop]

Parameters:

Returns: Number - id of the sound (0..65535) since Arma 3 v2.12 (was Nothing before that)

Examples

Example 1

playSoundUI ["Alarm", 0.5, 0.5];

Example 2

playSoundUI ["A3\Sounds_F\sfx\blip1.wss"];

Example 3

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

playSoundUI ["A3\Sounds_F\sfx\alarm_independent", 5, 1];        // no sound
playSoundUI ["A3\Sounds_F\sfx\alarm_independent.wss", 5, 1];    // alarm

See also

stopSound · soundParams · say3D · playSound · say2D · say · createSoundSource · setRandomLip · getMissionPath · playSound3D