createSoundSource: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[[cC]ategory:[sS]cripting [cC]ommands\|[a-z A-Z 0-9_]+\]\]" to "")
m (Text replacement - "\{\{( *)Important( *)\|" to "{{$1Feature$2|$2important$2|")
Line 51: Line 51:
Note that the sound created by [[createSoundSource]] will always be looping. Also when [[CfgSFX]] sound definition contains more than 1 sound, there is no guarantee that the sound played will be the same on every PC in Multiplayer.
Note that the sound created by [[createSoundSource]] will always be looping. Also when [[CfgSFX]] sound definition contains more than 1 sound, there is no guarantee that the sound played will be the same on every PC in Multiplayer.


{{Important| For some unknown reason if at the moment of command execution the player is in first person view and is inside a vehicle, the sound created is greatly attenuated}}
{{Feature|important| For some unknown reason if at the moment of command execution the player is in first person view and is inside a vehicle, the sound created is greatly attenuated}}


|'''createSoundSource''' [type, position, markers, placement]
|'''createSoundSource''' [type, position, markers, placement]

Revision as of 03:12, 7 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Broken CommandsSounds

Syntax

Syntax:
Syntax needed
Parameters:
[type, position, markers, placement]: Array
type: String - CfgVehicles class
position: PositionAGL, Position2D or Object - Desired placement position
markers: Array - If the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position. If any of the markers were given z coordinate with setMarkerPos, the sound will also be created at given z coordinate
placement: Number - The sound is placed inside a circle with given position as center and placement as its radius
Return Value:
Return value needed

Examples

Example 1:
_soundSource = createSoundSource ["LittleDog", position player, [], 0]
Example 2:
[] spawn { _alarm = createSoundSource ["Sound_Alarm", position player, [], 0]; //starts alarm sleep 10; deleteVehicle _alarm; //stops 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