playSoundUI: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
||
Line 21: | Line 21: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= <code> | |x1= <code>playSoundUI ["Alarm", 0.5, 0.5];</code> | ||
|x2= <code> | |x2= <code>playSoundUI ["A3\Sounds_F\sfx\blip1.wss"];</code> | ||
|x3= Sound file extension must be specified even if a config entry has none: | |x3= Sound file extension must be specified even if a config entry has none: |
Revision as of 11:12, 12 May 2022
Description
- Description:
- Plays given CfgSounds sound or a sound file given by file path through a dedicated UI sound channel unaffected by the global mixer volumes. If the file path is given, the leading slash will be ignored.
- Groups:
- Sounds
Syntax
- Syntax:
- playSoundUI [sound, volume, soundPitch]
- Parameters:
- sound: String - CfgSounds class or file as used in playSound3D (See Arma 3: Sound Files for available file names)
- volume: Number - (Optional, default 1) Sound volume. A value greater than 5 gets capped
- soundPitch: Number - (Optional, default 1)
- 1.0 → normal
- 0.5 → Darth Vader
- 2.0 → Chipmunks
- Return Value:
- Nothing
Examples
- Example 1:
playSoundUI ["Alarm", 0.5, 0.5];
- Example 2:
playSoundUI ["A3\Sounds_F\sfx\blip1.wss"];
- Example 3:
- Sound file extension must be specified even if a config entry has none:
playSoundUI ["A3\Sounds_F\sfx\alarm_independent", 5, 1]; // no sound playSoundUI ["A3\Sounds_F\sfx\alarm_independent.wss", 5, 1]; // 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