say: Difference between revisions

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


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


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


|arg= global |Multiplayer Arguments=
|game3= arma1
|version3= 1.00


|eff= local |Multiplayer Effects=
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| 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.
|game5= arma2oa
|version5= 1.50


* A dead or non-existent unit obviously cannot say anything.
|game6= tkoh
* If the camera is not within given range, title is not shown and the sound will not be heard.
|version6= 1.00
* 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=
|game7= arma3
____________________________________________________________________________________________
|version7= 0.50


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


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


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


| [[Nothing]] |RETURNVALUE=
|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.


|s2 = from [[say]] [sound, maxTitlesDistance, speed]|SYNTAX2=
* 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.
|p21= from: [[Object]] - origin of the sound |Parameter21=
* See also [[playSound]] in order to play a sound wherever the [[cameraOn|camera/player]] is.
 
|p22= sound: [[String]] - sound classname |Parameter22=
 
|p23= maxTitlesDistance: [[Number]] - max distance at which the sound can be heard. Default: 100 m. |Parameter23=
 
|p24= speed: [[Number]] - (Optional, default 1) pitch of the sound |Parameter24=
 
|r2= [[Nothing]] |RETURNVALUE2=
____________________________________________________________________________________________
 
|s3= [from, to] [[say]] sound |SYNTAX3=
 
|p41= from: [[Object]] - origin of the sound |Parameter41=
 
|p42= to: [[Object]] - target |Parameter42=
 
|p43= sound: [[String]] - sound classname |Parameter43=


|r3= [[Nothing]] |RETURNVALUE3=
{{Feature|informative|[[say]] will mimic either [[say2D]] or [[say3D]] depending on whether it is executed in a cutscene or in a game scene.}}
____________________________________________________________________________________________


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


|p61= from: [[Object]] - origin of the sound |Parameter61=
|p1= from: [[Object]] or [[Array]] of [[Object]]s
* [[Object]] - the sound source
* [[Array]] - format [from, to]:
** from: [[Object]] - sound source
** to: [[Object]] - target


|p62= to: [[Object]] - target |Parameter62=
|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


|p63= sound: [[String]] - sound classname |Parameter63=
|r1= [[Nothing]]


|p64= maxTitlesDistance: [[Number]] - max distance at which the sound can be heard. Default: 100 m. |Parameter64=
|x1= <sqf>(units player select 1) say ["whisper1", 5];</sqf>


|p65= speed: [[Number]] - (Optional, default 1) pitch of the sound. |Parameter65=
|x2= <sqf>player say "scuba_breath"; // Arma 3 vanilla sound</sqf>


| r4= [[Nothing]] |RETURNVALUE4=
|seealso= [[say3D]] [[say2D]] [[playSound]] [[createSoundSource]] [[playSoundUI]]
____________________________________________________________________________________________
 
|x1= <code>([[units]] [[player]] [[select]] 1) [[say]] ["whisper1", 5];</code> |EXAMPLE1=
 
|x2= Arma 3:<code>[[player]] [[say]] "scuba_breath";</code> |EXAMPLE2=
____________________________________________________________________________________________
 
| [[say3D]], [[say2D]], [[playSound]], [[createSoundSource]] |SEEALSO=
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 7 March 2013
<dt class="note">[[User:Rocket|Rocket]]
<dd class="note">
Say will occur in 3D when the player is active, during cutscenes it will not. Use [[say3D]] to force 3D effect for cutscenes.
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.46|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Sounds|{{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