say: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
Line 2: Line 2:
____________________________________________________________________________________________
____________________________________________________________________________________________


| ofpr |Game name=
| ofp |Game name=


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


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


| Unit will say given 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.


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.
* 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.


A unit that has been killed or does not exist will not say anything.
{{Informative | [[say]] will mimic either [[say2D]] or [[say3D]] depending on whether it is there executed in a cutscene or in a game scene.}} |DESCRIPTION=
____________________________________________________________________________________________


Compare this with [[playSound]] which will always play a sound at the location of the player.
| from [[say]] sound |SYNTAX=


If the camera is not within given range, title is not shown and the sound will not be heard.
|p1= from: [[Object]] - origin of the sound |Parameter1=


Sound is defined in CfgSound of the [[Description.ext]].
|p2= sound: [[String]] - sound classname |Parameter2=


<br><br>NOTE: [[say]] will mimic either [[say2D]] or [[say3D]] depending on whether it is there executed in a cut scene or in a game scene. |DESCRIPTION=
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


| from '''say''' sound|SYNTAX=
|s2 = from [[say]] [sound, maxTitlesDistance, speed]|SYNTAX2=
 
|p21= from: [[Object]] - origin of the sound |Parameter21=


|p1= from: [[Object]] - origin of the sound
|p22= sound: [[String]] - sound classname |Parameter22=
|p2= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]


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


| s2 = from '''say''' [sound, maxTitlesDistance, speed]|SYNTAX=
|p43= sound: [[String]] - sound classname |Parameter43=


|p21= from: [[Object]] - origin of the sound
|r3= [[Nothing]] |RETURNVALUE3=
|p22= [sound, maxTitlesDistance, speed]: [[Array]]
____________________________________________________________________________________________
|p23= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|p24= maxTitlesDistance: [[Number]] - max distance at which the sound can be heard. Default: 100 m.
|p25= speed (Optional): [[Number]] - pitch of the sound. Default: 1.


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


| s3= [from, to] '''say''' sound|SYNTAX=
|p61= from: [[Object]] - origin of the sound |Parameter61=


|p41= [from, to]: [[Array]]
|p62= to: [[Object]] - target |Parameter62=
|p42= from: [[Object]] - origin of the sound
|p43= to: [[Object]] - target
|p44= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]


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


| s4 = [from, to] '''say''' [sound, maxTitlesDistance, speed]|SYNTAX=
|p64= maxTitlesDistance: [[Number]] - max distance at which the sound can be heard. Default: 100 m. |Parameter64=


|p61= [from, to]: [[Array]]
|p65= speed: [[Number]] - (Optional, default 1) pitch of the sound. |Parameter65=
|p62= from: [[Object]] - origin of the sound
|p63= to: [[Object]] - target
|p64= [sound, maxTitlesDistance, speed]: [[Array]]
|p65= sound: [[String]] - classname of the sound to be played. Defined in CfgSounds including [[Description.ext]]
|p66= maxTitlesDistance: [[Number]] - max distance at which the sound can be heard. Default: 100 m.
|p67= speed (Optional): [[Number]] - pitch of the sound. Default: 1.


| r4= [[Nothing]] |RETURNVALUE=
| r4= [[Nothing]] |RETURNVALUE4=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>([[units]] [[player]] [[select]] 1) [[say]] ["whisper1",5];</code> |EXAMPLE1=
|x1= <code>([[units]] [[player]] [[select]] 1) [[say]] ["whisper1", 5];</code> |EXAMPLE1=
|x2= Arma 3:<code>[[player]] [[say]] "scuba_breath";</code>|EXAMPLE2=
 
|x2= Arma 3:<code>[[player]] [[say]] "scuba_breath";</code> |EXAMPLE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


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


Line 78: Line 81:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 7 March 2013
<dd class="notedate">Posted on 7 March 2013
<dt class="note">[[User:Rocket|Rocket]]<dd class="note">
<dt class="note">[[User:Rocket|Rocket]]
Say will occur in 3D when the player is active, during cutscenes it will not. Use [[say3D]] for cutscenes.
<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 -->
<!-- Note Section END -->


Line 86: Line 90:
<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>


[[Category:Scripting Commands|SAY]]
[[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 OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|SAY]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA|SAY]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|SAY]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|SAY]]
[[Category:Command_Group:_Sounds|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Sounds|{{uc:{{PAGENAME}}}}]]

Revision as of 00:05, 3 September 2019

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:
Uncategorised

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.

Bottom Section