createSoundSource: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
m (Text replacement - "v1\.69\.[0-9]{6}" to "v1.70") |
||
Line 21: | Line 21: | ||
* <tt>"Sound_SparklesWreck2"</tt> | * <tt>"Sound_SparklesWreck2"</tt> | ||
* <tt>"Sound_Stream"</tt> | * <tt>"Sound_Stream"</tt> | ||
Since Arma 3 v1. | Since Arma 3 v1.70 it is possible to define sounds for use with [[createSoundSource]] in mission config. As mentioned earlier, the sounds needed for this command should be defined inside [[CfgVehicles]] class, which itself references [[CfgSFX]] class. If given class searched in main config and is not found, the search will continue in [[description.ext]]. Here is an example of suitable mission config definition: | ||
<syntaxhighlight lang=php> | <syntaxhighlight lang=php> |
Revision as of 10:22, 3 April 2021
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
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