setSoundEffect: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">") |
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *P([a-gi-z ])" to "$1 - p$2") |
||
(21 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
|game1= arma1 | |game1= arma1 | ||
|version1= 1.00 | |version1= 1.00 | ||
|game2= arma2 | |game2= arma2 | ||
|version2= 1.00 | |version2= 1.00 | ||
|game3= arma2oa | |game3= arma2oa | ||
|version3= 1.50 | |||
|version3= 1. | |||
|game4= tkoh | |game4= tkoh | ||
|version4= 1.00 | |version4= 1.00 | ||
|game5= arma3 | |game5= arma3 | ||
|version5= 0.50 | |version5= 0.50 | ||
Line 27: | Line 22: | ||
|gr3= Waypoints | |gr3= Waypoints | ||
|descr= Defines the different sound effects. To stop any sound, deactivate the trigger (might take up to 0.5 seconds to stop) or delete the trigger (immediate). | |descr= Defines the different sound effects for a trigger or a waypoint. To stop any sound, deactivate the trigger (might take up to 0.5 seconds to stop) or delete the trigger/waypoint (immediate). | ||
|s1= trigger | |s1= trigger [[setSoundEffect]] [sound, voice, soundEnv, soundDet] | ||
|p1= trigger: [[Object]] | |p1= trigger: [[Object]] | ||
|p2= sound: [[String]] - | |p2= sound: [[String]] - plays a 2D sound as if [[playSound]] was used from CfgSounds (mission or main config). Use {{hl|"$NONE$"}} for an empty sound | ||
|p3= voice: [[String]] - | |p3= voice: [[String]] - attaches a 3D sound from CfgSounds (mission or main config) to the object that activated the trigger and plays it as if [[say3D]] was used | ||
|p4= soundEnv: [[String]] - | |p4= soundEnv: [[String]] - plays an environmental sound from CfgEnvSounds (mission or main config) | ||
|p5= soundDet: [[String]] - | |p5= soundDet: [[String]] - creates a dynamic sound object attached to a trigger defined in [[CfgSFX]] (mission or main config) | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|s2= waypoint | |s2= waypoint [[setSoundEffect]] [sound, voice] | ||
|p21= waypoint: [[Array]] - format [[Waypoint]] | |p21= waypoint: [[Array]] - format [[Waypoint]] | ||
|p22= sound: [[String]] - | |p22= sound: [[String]] - plays a 2D sound as if [[playSound]] was used from CfgSounds (mission or main config) | ||
|p23= voice: [[String]] - | |p23= voice: [[String]] - attaches a 3D sound from CfgSounds (mission or main config) to the object that activated the trigger and plays it as if [[say3D]] was used | ||
|r2= [[Nothing]] | |r2= [[Nothing]] | ||
|x2= < | |x1= <sqf>_trigger setSoundEffect ["Alarm", "", "", ""];</sqf> | ||
|x2= <sqf>[_group1, 2] setSoundEffect ["Alarm", ""];</sqf> | |||
|x3= < | |x3= <sqf>_trigger setSoundEffect ["$NONE$", "Alarm", "", ""];</sqf> | ||
|x4= < | |x4= <sqf>_trigger setSoundEffect ["$NONE$", "", "BattlefieldExplosions3", ""];</sqf> | ||
|x5= < | |x5= <sqf>_trigger setSoundEffect ["$NONE$", "", "", "Owl"];</sqf> | ||
|seealso= [[createTrigger]] | |seealso= [[createTrigger]] [[setMusicEffect]] [[setTitleEffect]] | ||
}} | }} | ||
Latest revision as of 15:45, 8 November 2023
Description
- Description:
- Defines the different sound effects for a trigger or a waypoint. To stop any sound, deactivate the trigger (might take up to 0.5 seconds to stop) or delete the trigger/waypoint (immediate).
- Groups:
- SoundsTriggersWaypoints
Syntax
- Syntax:
- trigger setSoundEffect [sound, voice, soundEnv, soundDet]
- Parameters:
- trigger: Object
- sound: String - plays a 2D sound as if playSound was used from CfgSounds (mission or main config). Use "$NONE$" for an empty sound
- voice: String - attaches a 3D sound from CfgSounds (mission or main config) to the object that activated the trigger and plays it as if say3D was used
- soundEnv: String - plays an environmental sound from CfgEnvSounds (mission or main config)
- soundDet: String - creates a dynamic sound object attached to a trigger defined in CfgSFX (mission or main config)
- Return Value:
- Nothing
Alternative Syntax
- Syntax:
- waypoint setSoundEffect [sound, voice]
- Parameters:
- waypoint: Array - format Waypoint
- sound: String - plays a 2D sound as if playSound was used from CfgSounds (mission or main config)
- voice: String - attaches a 3D sound from CfgSounds (mission or main config) to the object that activated the trigger and plays it as if say3D was used
- Return Value:
- Nothing
Examples
- Example 1:
- _trigger setSoundEffect ["Alarm", "", "", ""];
- Example 2:
- [_group1, 2] setSoundEffect ["Alarm", ""];
- Example 3:
- _trigger setSoundEffect ["$NONE$", "Alarm", "", ""];
- Example 4:
- _trigger setSoundEffect ["$NONE$", "", "BattlefieldExplosions3", ""];
- Example 5:
- _trigger setSoundEffect ["$NONE$", "", "", "Owl"];
Additional Information
- See also:
- createTrigger setMusicEffect setTitleEffect
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
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Sounds
- Command Group: Triggers
- Command Group: Waypoints