say2D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
mNo edit summary
 
Line 23: Line 23:
|s1= from [[say2D]] sound
|s1= from [[say2D]] sound


|p1= from: [[Object]] or [[Array]] of [[Object]]s
|p1= from: One of
* [[Object]] - the sound source
* [[Object]] - the sound source
* [[Array]] - format [from, to]:
* [[Array]] with [from, to]
** from: [[Object]] - sound source
** from: [[Object]] - sound source
** to: [[Object]] - target
** to: [[Object]] - target


|p2= sound: [[String]] or [[Array]]
|p2= sound: One of
* [[String]] - class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
* [[String]] - class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
* [[Array]] - format [sound, maxTitlesDistance, speed]:
* [[Array]] with [sound, maxTitlesDistance, speed]
** sound: [[String]] - class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
** sound: [[String]] - class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
** maxTitlesDistance: [[Number]] (Optional, default 100) - max. distance in meters at which the sound can be heard
** maxTitlesDistance: [[Number]] (Optional, default 100) - max. distance in meters at which the sound can be heard

Latest revision as of 11:10, 16 June 2024

Hover & click on the images for description

Description

Description:
Plays given sound in 2D.
Groups:
Sounds

Syntax

Syntax:
from say2D sound
Parameters:
from: One of
sound: One of
  • String - class name of the sound to be played. Defined in CfgSounds including Description.ext
  • Array with [sound, maxTitlesDistance, speed]
    • sound: String - class name of the sound to be played. Defined in CfgSounds including Description.ext
    • maxTitlesDistance: Number (Optional, default 100) - max. distance in meters at which the sound can be heard
    • speed: Number (Optional, default 1) - pitch of the sound
Return Value:
Nothing

Examples

Example 1:
player say2D "HelloThere";
Example 2:
[player, _officer] say2D ["HelloThere", 50, 0.9];

Additional Information

See also:
say say3D playSound createSoundSource playSoundUI

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