playSound3D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 35: Line 35:




|x1= <code>playSound3D ["A3\Sounds_F\sfx\blip1.wav", player]</code>|= EXAMPLE1  
|x1= <code>[[playSound3D]] ["A3\Sounds_F\sfx\blip1.wav", [[player]]]</code>|= EXAMPLE1  
|x2= <code>playSound3D ["A3\Sounds_F\sfx\blip1.wav", player, false, getPos player, 1, 1, 0]</code>|= EXAMPLE2  
|x2= <code>[[playSound3D]] ["A3\Sounds_F\sfx\blip1.wav", [[player]], [[false]], [[getPos]] [[player]], 1, 1, 0]</code>|= EXAMPLE2  
|x3= Sound file extension must be specified even if a config entry has none:
<code>[[playSound3D]] ["A3\Sounds_F\sfx\alarm_independent", [[player]]]; //no sound
[[playSound3D]] ["A3\Sounds_F\sfx\alarm_independent.wss", [[player]]]; //alarm</code>|= EXAMPLE3


____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 11:51, 29 September 2013

Hover & click on the images for description

Description

Description:
Plays a sound with given filename. At least 2 parameters must be added.
Groups:
Uncategorised

Syntax

Syntax:
playSound3D [filename, source, isInside, position, volume, frequency, distance]
Parameters:
[filename, source, isInside, position, volume, frequency, distance]: Array
filename: String
source: Object
isInside: Boolean
position: Position
volume: Number
frequency: Number
distance: Number - How far is sound audible (0 = no max distance).
Return Value:
Nothing

Examples

Example 1:
playSound3D ["A3\Sounds_F\sfx\blip1.wav", player]
Example 2:
playSound3D ["A3\Sounds_F\sfx\blip1.wav", player, false, getPos player, 1, 1, 0]
Example 3:
Sound file extension must be specified even if a config entry has none: playSound3D ["A3\Sounds_F\sfx\alarm_independent", player]; //no sound playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", player]; //alarm

Additional Information

See also:
See also needed

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

Notes

Posted on September 23, 2013
Killzone_Kid
This command works well with addon sounds, however getting it to play mission sound files is a bit tricky. Follow this guide

Bottom Section