say: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofp |Game name=
| ofp


|1.00|Game version=
|1.00


|arg= global |Multiplayer Arguments=
|arg= global


|eff= local |Multiplayer Effects=
|eff= local


|gr1= Sounds |GROUP1=
|gr1= Sounds


| Make unit say given sound. The sound is defined in [[Description.ext#CfgSounds|CfgSounds]]. If the [[Object#Unit|unit]] is a [[Object#Person|person]], it will also perform corresponding lipsync effect provided an appropriate .lip file has been created for this sound.
| Make unit say given sound. The sound is defined in [[Description.ext#CfgSounds|CfgSounds]]. If the [[Object#Unit|unit]] is a [[Object#Person|person]], it will also perform corresponding lipsync effect provided an appropriate .lip file has been created for this sound.
Line 17: Line 17:
* See also [[playSound]] in order to play a sound wherever the [[cameraOn|camera/player]] is.
* See also [[playSound]] in order to play a sound wherever the [[cameraOn|camera/player]] is.


{{Informative | [[say]] will mimic either [[say2D]] or [[say3D]] depending on whether it is there executed in a cutscene or in a game scene.}} |DESCRIPTION=
{{Informative | [[say]] will mimic either [[say2D]] or [[say3D]] depending on whether it is there executed in a cutscene or in a game scene.}}


| from [[say]] sound |SYNTAX=
| from [[say]] sound


|p1= from: [[Object]] - origin of the sound |Parameter1=
|p1= from: [[Object]] - origin of the sound


|p2= sound: [[String]] - sound classname |Parameter2=
|p2= sound: [[String]] - sound classname


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]


|s2 = from [[say]] [sound, maxTitlesDistance, speed]|SYNTAX2=
|s2 = from [[say]] [sound, maxTitlesDistance, speed]


|p21= from: [[Object]] - origin of the sound |Parameter21=
|p21= from: [[Object]] - origin of the sound |Parameter21=
Line 37: Line 37:
|p24= speed: [[Number]] - (Optional, default 1) pitch of the sound |Parameter24=
|p24= speed: [[Number]] - (Optional, default 1) pitch of the sound |Parameter24=


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


|s3= [from, to] [[say]] sound |SYNTAX3=
|s3= [from, to] [[say]] sound


|p41= from: [[Object]] - origin of the sound |Parameter41=
|p41= from: [[Object]] - origin of the sound |Parameter41=
Line 47: Line 47:
|p43= sound: [[String]] - sound classname |Parameter43=
|p43= sound: [[String]] - sound classname |Parameter43=


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


|s4 = [from, to] [[say]] [sound, maxTitlesDistance, speed]|SYNTAX4=
|s4 = [from, to] [[say]] [sound, maxTitlesDistance, speed]


|p61= from: [[Object]] - origin of the sound |Parameter61=
|p61= from: [[Object]] - origin of the sound |Parameter61=
Line 61: Line 61:
|p65= speed: [[Number]] - (Optional, default 1) pitch of the sound. |Parameter65=
|p65= speed: [[Number]] - (Optional, default 1) pitch of the sound. |Parameter65=


| r4= [[Nothing]] |RETURNVALUE4=
| r4= [[Nothing]]
   
   
|x1= <code>([[units]] [[player]] [[select]] 1) [[say]] ["whisper1", 5];</code> |EXAMPLE1=
|x1= <code>([[units]] [[player]] [[select]] 1) [[say]] ["whisper1", 5];</code>


|x2= Arma 3:<code>[[player]] [[say]] "scuba_breath";</code> |EXAMPLE2=
|x2= Arma 3:<code>[[player]] [[say]] "scuba_breath";</code>


| [[say3D]], [[say2D]], [[playSound]], [[createSoundSource]] |SEEALSO=
| [[say3D]], [[say2D]], [[playSound]], [[createSoundSource]]
}}
}}



Revision as of 11:04, 18 January 2021

Hover & click on the images for description

Description

Description:
Make unit say given sound. The sound is defined in CfgSounds. If the unit is a person, it will also perform corresponding lipsync effect provided an appropriate .lip file has been created for this sound.
  • A dead or non-existent unit obviously cannot say anything.
  • If the camera is not within given range, title is not shown and the sound will not be heard.
  • See also playSound in order to play a sound wherever the camera/player is.
say will mimic either say2D or say3D depending on whether it is there executed in a cutscene or in a game scene.
Groups:
Sounds

Syntax 1

Syntax:
from say sound
Parameters:
from: Object - origin of the sound
sound: String - sound classname
Return Value:
Nothing

Syntax 2

Syntax:
from say [sound, maxTitlesDistance, speed]
Parameters:
from: Object - origin of the sound
sound: String - sound classname
maxTitlesDistance: Number - max distance at which the sound can be heard. Default: 100 m.
speed: Number - (Optional, default 1) pitch of the sound
Return Value:
Nothing

Syntax 3

Syntax:
[from, to] say sound
Parameters:
from: Object - origin of the sound
to: Object - target
sound: String - sound classname
Return Value:
Nothing

Syntax 4

Syntax:
[from, to] say [sound, maxTitlesDistance, speed]
Parameters:
from: Object - origin of the sound
to: Object - target
sound: String - sound classname
maxTitlesDistance: Number - max distance at which the sound can be heard. Default: 100 m.
speed: Number - (Optional, default 1) pitch of the sound.
Return Value:
Nothing

Examples

Example 1:
(units player select 1) say ["whisper1", 5];
Example 2:
Arma 3:player say "scuba_breath";

Additional Information

See also:
say3Dsay2DplaySoundcreateSoundSource

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

Posted on 7 March 2013
Rocket
Say will occur in 3D when the player is active, during cutscenes it will not. Use say3D to force 3D effect for cutscenes.