say2D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "")
mNo edit summary
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma2
|game1= arma2
|version1= 1.00


|1.00
|game2= arma2oa
|version2= 1.50
 
|game3= tkoh
|version3= 1.00
 
|game4= arma3
|version4= 0.50


|arg= global
|arg= global
Line 11: Line 19:
|gr1= Sounds
|gr1= Sounds


| Plays given sound in 2D
|descr= Plays given sound in 2D.
 
| from [[say2D]] sound
 
|p1= from: [[Object]] - origin of the sound
|p2= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]
 
| [[Nothing]]
 
| s2 = from [[say2D]] [sound, maxTitlesDistance, speed]
 
|p21= from: [[Object]] - origin of the sound
|p22= [sound, maxTitlesDistance, speed]: [[Array]]
|p23= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|p24= maxTitlesDistance: [[Number]] - max distance at which the sound can be heard. Default: 100 m.
|p25= speed (Optional): [[Number]] - pitch of the sound. Default: 1.
 
| r2= [[Nothing]]
 
| s3= [from, to] [[say2D]] sound
 
|p41= [from, to]: [[Array]]
|p42= from: [[Object]] - origin of the sound
|p43= to: [[Object]] - target
|p44= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]


| r3= [[Nothing]]
|s1= from [[say2D]] sound


| s4 = [from, to] [[say2D]] [sound, maxTitlesDistance, speed]
|p1= from: One of
* [[Object]] - the sound source
* [[Array]] with [from, to]
** from: [[Object]] - sound source
** to: [[Object]] - target


|p61= [from, to]: [[Array]]
|p2= sound: One of
|p62= from: [[Object]] - origin of the sound
* [[String]] - class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|p63= to: [[Object]] - target
* [[Array]] with [sound, maxTitlesDistance, speed]
|p64= [sound, maxTitlesDistance, speed]: [[Array]]
** sound: [[String]] - class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|p65= sound: [[String]] - classname 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
|p66= maxTitlesDistance: [[Number]] - max distance at which the sound can be heard. Default: 100 m.
** speed: [[Number]] (Optional, default 1) - pitch of the sound
|p67= speed (Optional): [[Number]] - pitch of the sound. Default: 1.


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


|x1= <code>[[player]] [[say2D]] "HelloThere";</code>
|x1= <sqf>player say2D "HelloThere";</sqf>


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


| [[say]], [[say3D]], [[playSound]], [[createSoundSource]]
|seealso= [[say]] [[say3D]] [[playSound]] [[createSoundSource]] [[playSoundUI]]
 
|
}}
}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 10: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