say: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{uc:{{PAGENAME}}}} " to "")
m (Some wiki formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| ofp
|game1= ofp
|version1= 1.00


|1.00
|game2= ofpe
|version2= 1.00
 
|game3= arma1
|version3= 1.00
 
|game4= arma2
|version4= 1.00
 
|game5= arma2oa
|version5= 1.50
 
|game6= tkoh
|version6= 1.00
 
|game7= arma3
|version7= 0.50


|arg= global
|arg= global
Line 11: Line 28:
|gr1= Sounds
|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.
|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 corresponding lipsync effect provided an appropriate .lip file has been created for this sound.


* A dead or non-existent unit obviously cannot say anything.
* A dead or non-existent unit obviously cannot say anything.
Line 17: Line 34:
* 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.


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


| from [[say]] sound
|s1= from [[say]] sound


|p1= from: [[Object]] - origin of the sound
|p1= from: [[Object]] - origin of the sound
Line 25: Line 42:
|p2= sound: [[String]] - sound classname
|p2= sound: [[String]] - sound classname


| [[Nothing]]
|r1= [[Nothing]]


|s2 = from [[say]] [sound, maxTitlesDistance, speed]
|s2 = from [[say]] [sound, maxTitlesDistance, speed]
Line 61: Line 78:
|p65= speed: [[Number]] - (Optional, default 1) pitch of the sound.
|p65= speed: [[Number]] - (Optional, default 1) pitch of the sound.


| r4= [[Nothing]]
|r4= [[Nothing]]
   
   
|x1= <code>([[units]] [[player]] [[select]] 1) [[say]] ["whisper1", 5];</code>
|x1= <code>([[units]] [[player]] [[select]] 1) [[say]] ["whisper1", 5];</code>
Line 69: Line 86:
|seealso= [[say3D]], [[say2D]], [[playSound]], [[createSoundSource]]
|seealso= [[say3D]], [[say2D]], [[playSound]], [[createSoundSource]]
}}
}}
<dl class="command_description">
<dd class="notedate">Posted on 7 March 2013</dd>
<dt class="note">[[User:Rocket|Rocket]]</dt>
<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.
</dl>
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}

Revision as of 15:43, 9 June 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 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