Difference between revisions of "DCS func outSound"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
 
(2 intermediate revisions by the same user not shown)
Line 31: Line 31:
 
|optType2=
 
|optType2=
  
|examples=  
+
|examples= trigger.action.outSound('hq_ThisIsWizard.wav')
 +
 
 +
You can also create custom folders within the miz to store sound files. For example below has a folder named "Sounds" and plays the sound "fileName.wav" inside the Sounds folder. This can be useful to add sound files to a mission without having to add those files via triggers.
 +
 
 +
    trigger.action.outSound("Sounds/fileName.wav")
 +
 
 
|related=  
 
|related=  
 
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}}
 
[[DCS_singleton_trigger|'''Trigger Functions:''']] {{ListOfTriggerFuncs}}
Line 37: Line 42:
 
}}
 
}}
 
[[Category:Singleton Functions|outSound]]
 
[[Category:Singleton Functions|outSound]]
 +
[[Category:Game Patch 1.2.0|outSound]]

Latest revision as of 22:46, 17 March 2022

Scripting Root

Envrioment: Mission Scripting
Function: outSound Added with: 1.2.0
Member Of: trigger.action
Syntax: function trigger.action.outSound(string soundfile )
Description: Plays a sound file to all players. The sound file must be placed inside of the miz file in order to be played.


Return Value: function
Return Example: none
Examples: trigger.action.outSound('hq_ThisIsWizard.wav')

You can also create custom folders within the miz to store sound files. For example below has a folder named "Sounds" and plays the sound "fileName.wav" inside the Sounds folder. This can be useful to add sound files to a mission without having to add those files via triggers.

   trigger.action.outSound("Sounds/fileName.wav")
Related Functions: Trigger Functions: ctfColorTag, getUserFlag, setUserFlag, getZone, explosion, smoke, effectSmokeBig, effectSmokeStop, illuminationBomb, signalFlare, radioTransmission, stopRadioTransmission, setUnitInternalCargo

outSound, outSoundForCoalition, outSoundForCountry, outSoundForGroup, outSoundForUnit, outText, outTextForCoalition, outTextForCountry, outTextForGroup, outTextForUnit

addOtherCommand, removeOtherCommand, addOtherCommandForCoalition, removeOtherCommandForCoalition, addOtherCommandForGroup, removeOtherCommandForGroup

markToAll, markToCoalition, markToGroup, removeMark, markupToAll, lineToAll, circleToAll, rectToAll, quadToAll, textToAll, arrowToAll, setMarkupRadius, setMarkupText, setMarkupFontSize, setMarkupColor, setMarkupColorFill, setMarkupTypeLine, setMarkupPositionEnd, setMarkupPositionStart

setAITask, pushAITask, activateGroup, deactivateGroup, setGroupAIOn, setGroupAIOff, groupStopMoving, groupContinueMoving

Notes: Due to changes in the mission file format in 1.5 it may be needed to add 'l10n/DEFAULT/' to the string of the sound file to specify where it is located within the .miz.