say2D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|game2= arma2oa |version2= 1.51 " to "|game2= arma2oa |version2= 1.50 ")
m (Some wiki formatting)
 
(12 intermediate revisions by 2 users not shown)
Line 2: Line 2:


|game1= arma2
|game1= arma2
|version1= 1.00
|version1= 1.00


|game2= arma2oa
|game2= arma2oa
|version2= 1.50
|version2= 1.50


|game3= tkoh
|game3= tkoh
|version3= 1.00
|version3= 1.00


|game4= arma3
|game4= arma3
|version4= 0.50
|version4= 0.50


Line 27: Line 23:
|s1= from [[say2D]] sound
|s1= from [[say2D]] sound


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


|p2= sound: [[String]] - Class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|p2= sound: [[String]] or [[Array]]
* [[String]] - class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
* [[Array]] - format [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


|r1= [[Nothing]]
|r1= [[Nothing]]


|s2 = from [[say2D]] [sound, maxTitlesDistance, speed]
|x1= <sqf>player say2D "HelloThere";</sqf>
 
|p21= from: [[Object]] - Origin of the sound
 
|p22= sound: [[String]] - Class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
 
|p24= maxTitlesDistance: [[Number]] (Optional, default 100) - Max. distance in meters at which the sound can be heard
 
|p25= speed: [[Number]] (Optional, default 1) - Pitch of the sound
 
|r2= [[Nothing]]
 
|s3= [from, to] [[say2D]] sound
 
|p41= from: [[Object]] - Origin of the sound
 
|p42= to: [[Object]] - Target
 
|p43= sound: [[String]] - Class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
 
|r3= [[Nothing]]
 
|s4 = [from, to] [[say2D]] [sound, maxTitlesDistance, speed]
 
|p61= from: [[Object]] - Origin of the sound
 
|p62= to: [[Object]] - Target
 
|p63= sound: [[String]] - Class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
 
|p64= maxTitlesDistance: [[Number]] (Optional, default 100) - Max. distance in meters at which the sound can be heard
|p65= speed: [[Number]] (Optional, default 1) - Pitch of the sound
 
|r4= [[Nothing]]
 
|x1= <code>[[player]] [[say2D]] "HelloThere";</code>


|x2= <code><nowiki>[</nowiki>[[player]], _officer] [[say2D]] ["HelloThere", 50, 0.9];</code>
|x2= <sqf>[player, _officer] say2D ["HelloThere", 50, 0.9];</sqf>


|seealso= [[say]], [[say3D]], [[playSound]], [[createSoundSource]]
|seealso= [[say]] [[say3D]] [[playSound]] [[createSoundSource]] [[playSoundUI]]
}}
}}

Latest revision as of 16:07, 25 February 2023

Hover & click on the images for description

Description

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

Syntax

Syntax:
from say2D sound
Parameters:
from: Object or Array of Objects
sound: String or Array
  • String - class name of the sound to be played. Defined in CfgSounds including Description.ext
  • Array - format [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