soundParams: Difference between revisions
BrettMayson (talk | contribs) No edit summary |
BrettMayson (talk | contribs) mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 13: | Line 13: | ||
|r1= | |r1= | ||
* ''id'' != -1: [[Array]] with [path, curPos, length, time, volume] | * ''id'' != -1: [[Array]] with [path, curPos, length, time, volume] | ||
** path: [[String]] - the path to the played sound file | ** path: [[String]] - the path to the played sound file | ||
** curPos: [[Number]] - current play position in 0...1 range | ** curPos: [[Number]] - current play position in 0...1 range | ||
| Line 20: | Line 20: | ||
** volume: [[Number]] - playback volume | ** volume: [[Number]] - playback volume | ||
** {{GVI|arma3|2.22|size= 0.75}} loop: [[Boolean]] - [[true]] if the sound is looping | ** {{GVI|arma3|2.22|size= 0.75}} loop: [[Boolean]] - [[true]] if the sound is looping | ||
* {{GVI|arma3|2.22|size= 0.75}} ''id'' == -1: [[Array]] | * {{GVI|arma3|2.22|size= 0.75}} ''id'' == -1: [[Array]] with [sid1, sid2, sid3..., sidn], where sid is sound id returned by [[playSoundUI]] and [[playSound3D]] | ||
|x1= <sqf>private _params = soundParams 10;</sqf> | |x1= <sqf>private _params = soundParams 10;</sqf> | ||
Latest revision as of 10:02, 2 January 2026
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 with [path, curPos, length, time, volume]
2.22 id == -1: Array with [sid1, sid2, sid3..., sidn], where sid is sound id returned by playSoundUI and playSound3D
Examples
- Example 1:
- Example 2:
- Wait for sound to end:
Additional Information
- See also:
- playSoundUI playSound3D stopSound
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note