say2D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
 
(44 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| Command description. |= Description
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


|
|game4= arma3
*unit '''say2D''' speechName
|version4= 0.50
*[unit, target] '''say2D''' speechName
|= Syntax


|p1= unit: [[Object|object]] -  |= PARAMETER1
|arg= global


|p2= target: [[Object|object]] |= PARAMETER2
|eff= local


|p3= speechName: dataType |= PARAMETER3
|gr1= Sounds


| returnValue |= RETURNVALUE
|descr= Plays given sound in 2D.


|x1= |= EXAMPLE1
|s1= from [[say2D]] sound


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


| [[say]], [[say3D]], [[playSound]], [[createSoundSource]] |= SEEALSO
|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


| |= MPBEHAVIOUR
|r1= [[Nothing]]
____________________________________________________________________________________________
 
}}
|x1= <sqf>player say2D "HelloThere";</sqf>


<h3 style='display:none'>Notes</h3>
|x2= <sqf>[player, _officer] say2D ["HelloThere", 50, 0.9];</sqf>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>


<h3 style='display:none'>Bottom Section</h3>
|seealso= [[say]] [[say3D]] [[playSound]] [[createSoundSource]] [[playSoundUI]]
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

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