say2D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (Add examples)
Line 1: Line 1:
{{Command|= Comments
{{Command|Comments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| arma2 |Game name=


|1.00|= Game version
|1.00|Game version=


|arg= global |Multiplayer Arguments=
|arg= global |Multiplayer Arguments=
Line 14: Line 14:
____________________________________________________________________________________________
____________________________________________________________________________________________


| from '''say2D''' sound|SYNTAX=
| from [[say2D]] sound |SYNTAX=


|p1= from: [[Object]] - origin of the sound
|p1= from: [[Object]] - origin of the sound
Line 21: Line 21:
| [[Nothing]] |RETURNVALUE=
| [[Nothing]] |RETURNVALUE=


| s2 = from '''say2D''' [sound, maxTitlesDistance, speed]|SYNTAX=
| s2 = from [[say2D]] [sound, maxTitlesDistance, speed] |SYNTAX2=


|p21= from: [[Object]] - origin of the sound
|p21= from: [[Object]] - origin of the sound
Line 29: Line 29:
|p25= speed (Optional): [[Number]] - pitch of the sound. Default: 1.
|p25= speed (Optional): [[Number]] - pitch of the sound. Default: 1.


| r2= [[Nothing]] |RETURNVALUE=
| r2= [[Nothing]] |RETURNVALUE2=


| s3= [from, to] '''say2D''' sound|SYNTAX=
| s3= [from, to] [[say2D]] sound|SYNTAX3=


|p41= [from, to]: [[Array]]
|p41= [from, to]: [[Array]]
Line 38: Line 38:
|p44= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|p44= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]


| r3= [[Nothing]] |RETURNVALUE=
| r3= [[Nothing]] |RETURNVALUE3=


| s4 = [from, to] '''say2D''' [sound, maxTitlesDistance, speed]|SYNTAX=
| s4 = [from, to] [[say2D]] [sound, maxTitlesDistance, speed] |SYNTAX4=


|p61= [from, to]: [[Array]]
|p61= [from, to]: [[Array]]
Line 50: Line 50:
|p67= speed (Optional): [[Number]] - pitch of the sound. Default: 1.
|p67= speed (Optional): [[Number]] - pitch of the sound. Default: 1.


| r4= [[Nothing]] |RETURNVALUE=
| r4= [[Nothing]] |RETURNVALUE4=
____________________________________________________________________________________________
 
|x1= <code>[[player]] [[say2D]] "HelloThere";</code> |Example 1=
 
|x2= <code><nowiki>[</nowiki>[[player]], _officer] [[say2D]] ["HelloThere", 50, 0.9];</code> |Example 2=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 56: Line 61:


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=  
____________________________________________________________________________________________
}}
}}



Revision as of 23:22, 17 August 2019

Hover & click on the images for description

Description

Description:
Plays given sound in 2D
Groups:
Uncategorised

Syntax 1

Syntax:
from say2D sound
Parameters:
from: Object - origin of the sound
sound: String - classname 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, maxTitlesDistance, speed]: Array
sound: String - classname of the sound to be played. Defined in CfgSounds including Description.ext
maxTitlesDistance: Number - max distance at which the sound can be heard. Default: 100 m.
speed (Optional): Number - pitch of the sound. Default: 1.
Return Value:
Nothing

Syntax 3

Syntax:
[from, to] say2D sound
Parameters:
[from, to]: Array
from: Object - origin of the sound
to: Object - target
sound: String - classname 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, to]: Array
from: Object - origin of the sound
to: Object - target
[sound, maxTitlesDistance, speed]: Array
sound: String - classname of the sound to be played. Defined in CfgSounds including Description.ext
maxTitlesDistance: Number - max distance at which the sound can be heard. Default: 100 m.
speed (Optional): Number - pitch of the sound. Default: 1.
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

Notes

Bottom Section