{"name":"playSoundUI","operator":null,"title":"playSoundUI","type":"command","url":"https://community.bistudio.com/wiki/playSoundUI","revid":376806,"updated":"2025-11-21T17:10:26Z","groups":["Sounds"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.10"}],"since":{"game":"arma3","name":"Arma 3","version":"2.10"},"arma3_since":"2.10","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"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","syntaxes":[{"syntax":"playSoundUI [sound, volume, soundPitch, isEffect, offset, loop]","since":null,"effect":null,"exec":null,"params":[{"name":"sound","type":"String","optional":false,"default":null,"description":"CfgSounds class or file as used in playSound3D (see Arma 3: Sound Files for available file names)","types":["String"],"since":null,"text":"sound: String - CfgSounds class or file as used in playSound3D (see Arma 3: Sound Files for available file names)"},{"name":"volume","type":"Number","optional":true,"default":"1","description":"sound volume clamped in range 0..5","types":["Number"],"since":null,"text":"volume: Number - (Optional, default 1) sound volume clamped in range 0..5"},{"name":"soundPitch","type":"Number","optional":true,"default":"1","description":"1.0 → normal\n- 0.5 → Darth Vader\n- 2.0 → Chipmunks","types":["Number"],"since":null,"text":"soundPitch: Number - (Optional, default 1)\n- 1.0 → normal\n- 0.5 → Darth Vader\n- 2.0 → Chipmunks"},{"name":"isEffect","type":"Boolean","optional":true,"default":"false","description":"if true, diverts sound through effects channel (see fadeSound, soundVolume)","types":["Boolean"],"since":null,"text":"isEffect: Boolean - (Optional, default false) if true, diverts sound through effects channel (see fadeSound, soundVolume)"},{"name":"offset","type":"Number","optional":true,"default":"0","description":"offset in seconds. Same as with playSound3D (ignored if sound is set to 'loop')","types":["Number"],"since":"arma3 2.12","text":"offset: Number - (Optional, default 0) offset in seconds. Same as with playSound3D (ignored if sound is set to 'loop')"},{"name":"loop","type":"Boolean","optional":true,"default":"false","description":"If true the sound will loop forever. Use stopSound to stop","types":["Boolean"],"since":"arma3 2.22","text":"loop: Boolean - (Optional, default false) If true the sound will loop forever. Use stopSound to stop"}],"returns":{"type":"Number","types":["Number"],"description":"id of the sound (0..65535) since Arma 3 v2.12 (was Nothing before that)","text":"Number - id of the sound (0..65535) since Arma 3 v2.12 (was Nothing before that)"},"form":"unary","operator":null,"left":null,"right":{"text":"[sound, volume, soundPitch, isEffect, offset, loop]","types":["Array"]}}],"examples":[{"text":"```sqf\nplaySoundUI [\"Alarm\", 0.5, 0.5];\n```","code":["playSoundUI [\"Alarm\", 0.5, 0.5];"]},{"text":"```sqf\nplaySoundUI [\"A3\\Sounds_F\\sfx\\blip1.wss\"];\n```","code":["playSoundUI [\"A3\\Sounds_F\\sfx\\blip1.wss\"];"]},{"text":"Sound file extension must be specified even if a config entry has none:\n\n```sqf\nplaySoundUI [\"A3\\Sounds_F\\sfx\\alarm_independent\", 5, 1];        // no sound\nplaySoundUI [\"A3\\Sounds_F\\sfx\\alarm_independent.wss\", 5, 1];    // alarm\n```","code":["playSoundUI [\"A3\\Sounds_F\\sfx\\alarm_independent\", 5, 1];\t\t// no sound\nplaySoundUI [\"A3\\Sounds_F\\sfx\\alarm_independent.wss\", 5, 1];\t// alarm"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["stopSound","soundParams","say3D","playSound","say2D","say","createSoundSource","setRandomLip","getMissionPath","playSound3D"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Sounds","Introduced with Arma 3 version 2.10","Scripting Commands","Scripting Commands: Local Effect"]}