soundParams

From Bohemia Interactive Community
Revision as of 18:39, 21 November 2025 by Lou Montana (talk | contribs) (Some wiki formatting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Hover & click on the images for description

Description

Description:
Returns various params for the given sound
Groups:
Sounds

Syntax

Syntax:
soundParams id
Parameters:
id: Number - id returned by playSoundUI and playSound3D commands, -1 to return all currently playing ids
Return Value:
  • id != -1: Array in format [path, curPos, length, time, volume], where:
    • path: String - the path to the played sound file
    • curPos: Number - current play position in 0...1 range
    • length: Number - total sound duration in seconds
    • time: Number - time passed since the start of playback
    • volume: Number - playback volume
    • Arma 3 logo black.png 2.22 loop: Boolean - true if the sound is looping
  • Arma 3 logo black.png 2.22 id == -1: Array in format [sid1, sid2, sid3..., sidn], where sid is sound id returned by playSoundUI and playSound3D

Examples

Example 1:
private _params = soundParams 10;
Example 2:
Wait for sound to end:
private _sound = playSound3D ["A3\Sounds_F\sfx\blip1.wss", player]; waitUntil { soundParams _sound isEqualTo [] };

Additional Information

See also:
playSoundUI playSound3D stopSound

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note