say: Difference between revisions

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


| ofpr |= Game name
|game1= ofp
|version1= 1.00


|1.75|= Game version
|game2= ofpe
____________________________________________________________________________________________
|version2= 1.00


| Unit will say given sound.
|game3= arma1
|version3= 1.00


When 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.
|game4= arma2
|version4= 1.00


A unit that has been killed or does not exist will not say anything.
|game5= arma2oa
|version5= 1.50


Compare this with [[playSound]] which will always play a sound at the location of the player.
|game6= tkoh
|version6= 1.00


If the camera is not within given range, title is not shown and the sound will not be heard.
|game7= arma3
|version7= 0.50


Sound is defined in CfgSound of the [[Description.ext]]. |= Description
|arg= global
____________________________________________________________________________________________


| unit '''say''' [sound, maxTitlesDistance,speed]|= Syntax
|eff= local


|p1= unit: [[Object]]
|gr1= Sounds
|p2= [sound, maxTitlesDistance,speed]: [[Array]]
|p3= sound: [[String]] classname. Defined in [[Description.ext]]
|p4= maxTitlesDistance: [[Number]]
|p5= speed: [[Number]]. Optional


| [[Nothing]] |= Return value
|descr= 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 the corresponding lipsync effect provided an appropriate [[Lip File Format|.lip file]] has been [[WaveToLip|created]] for this sound.
 
|x1= <code>([[units]] [[player]] [[select]] 1) say ["whisper1",5]</code> |= Example 1
____________________________________________________________________________________________


|  |= See also
* 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 [[cameraOn|camera/player]] is.


}}
{{Feature|informative|[[say]] will mimic either [[say2D]] or [[say3D]] depending on whether it is executed in a cutscene or in a game scene.}}
 
|s1= from [[say]] sound
 
|p1= from: [[Object]] or [[Array]] of [[Object]]s
* [[Object]] - the sound source
* [[Array]] - format [from, to]:
** from: [[Object]] - sound source
** to: [[Object]] - target
 
|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
 
|r1= [[Nothing]]
 
|x1= <sqf>(units player select 1) say ["whisper1", 5];</sqf>


<h3 style="display:none">Notes</h3>
|x2= <sqf>player say "scuba_breath"; // Arma 3 vanilla sound</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->
This command is global and transmitted across the network. Execute it on the server only in your multiplayer missions, otherwise each player's execution will transmit and replicate across the network. Hence, you will get the sound being played however many times there are players on the server.
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[say3D]] [[say2D]] [[playSound]] [[createSoundSource]] [[playSoundUI]]
[[Category:Scripting Commands|SAY]]
}}
[[Category:Scripting Commands OFP 1.96|SAY]]
[[Category:Scripting Commands ArmA|SAY]]
[[Category:Scripting Commands ArmA2|SAY]]
[[Category:Command_Group:_Sounds|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands VBS2|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:17, 25 February 2023

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 the 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 executed in a cutscene or in a game scene.
Groups:
Sounds

Syntax

Syntax:
from say 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:
(units player select 1) say ["whisper1", 5];
Example 2:
player say "scuba_breath"; // Arma 3 vanilla sound

Additional Information

See also:
say3D say2D 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