say2D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma2
|game1= arma2


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


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


| Plays given sound in 2D
|descr= Plays given sound in 2D.
 
|s1= from [[say2D]] sound
 
|p1= from: [[Object]] - Origin of the sound


| from [[say2D]] sound
|p2= sound: [[String]] - Class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]


|p1= from: [[Object]] - origin of the sound
|r1= [[Nothing]]
|p2= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]


| [[Nothing]]
|s2 = from [[say2D]] [sound, maxTitlesDistance, speed]


| s2 = from [[say2D]] [sound, maxTitlesDistance, speed]
|p21= from: [[Object]] - Origin of the sound


|p21= from: [[Object]] - origin of the sound
|p22= sound: [[String]] - Class name of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|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]]
|p24= maxTitlesDistance: [[Number]] (optional, default 100) - Max. distance in meters at which the sound can be heard


| s3= [from, to] [[say2D]] sound
|p25= speed: [[Number]] (optional, default 1) - Pitch of the sound


|p41= [from, to]: [[Array]]
|r2= [[Nothing]]
|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]]
|s3= [from, to] [[say2D]] sound


| s4 = [from, to] [[say2D]] [sound, maxTitlesDistance, speed]
|p41= from: [[Object]] - Origin of the sound


|p61= [from, to]: [[Array]]
|p42= to: [[Object]] - Target
|p62= from: [[Object]] - origin of the sound
|p63= to: [[Object]] - target
|p64= [sound, maxTitlesDistance, speed]: [[Array]]
|p65= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|p66= maxTitlesDistance: [[Number]] - max distance at which the sound can be heard. Default: 100 m.
|p67= speed (Optional): [[Number]] - pitch of the sound. Default: 1.


| r4= [[Nothing]]
|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>
|x1= <code>[[player]] [[say2D]] "HelloThere";</code>
Line 57: Line 75:
|seealso= [[say]], [[say3D]], [[playSound]], [[createSoundSource]]
|seealso= [[say]], [[say3D]], [[playSound]], [[createSoundSource]]
}}
}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 10:45, 28 March 2021

Hover & click on the images for description

Description

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

Syntax 1

Syntax:
from say2D sound
Parameters:
from: Object - Origin of the sound
sound: String - Class name of the sound to be played. Defined in CfgSounds including Description.ext
Return Value:
Nothing

Syntax 2

Syntax:
from say2D [sound, maxTitlesDistance, speed]
Parameters:
from: Object - Origin of the sound
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

Syntax 3

Syntax:
[from, to] say2D sound
Parameters:
from: Object - Origin of the sound
to: Object - Target
sound: String - Class name of the sound to be played. Defined in CfgSounds including Description.ext
Return Value:
Nothing

Syntax 4

Syntax:
[from, to] say2D [sound, maxTitlesDistance, speed]
Parameters:
from: Object - Origin of the sound
to: Object - Target
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:
saysay3DplaySoundcreateSoundSource

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