setCustomSoundController: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)\]\]" to "{{GameCategory|arma3|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Sounds |GROUP1= | |gr1= Sounds |GROUP1= | ||
| Sets value of the specified custom sound controller to be used in [[simple expression]]s in config. Returns [[true]] if value was set to the controller, [[false]] if command fails, for example if vehicle is not a transport or controller name is not recognised.<br><br> | | Sets value of the specified custom sound controller to be used in [[simple expression]]s in config. Returns [[true]] if value was set to the controller, [[false]] if command fails, for example if vehicle is not a transport or controller name is not recognised.<br><br> | ||
Line 13: | Line 11: | ||
<code>[[format]] ["CustomSoundController%1", _number]</code> | <code>[[format]] ["CustomSoundController%1", _number]</code> | ||
Where <tt>_number</tt> is a number from 1 to [[getCustomSoundControllerCount]] (currently 32)}} |DESCRIPTION= | Where <tt>_number</tt> is a number from 1 to [[getCustomSoundControllerCount]] (currently 32)}} |DESCRIPTION= | ||
| '''setCustomSoundController''' [vehicle, controller, value]|SYNTAX= | | '''setCustomSoundController''' [vehicle, controller, value]|SYNTAX= | ||
Line 23: | Line 20: | ||
|p3 = value: [[Number]] - desired value|PARAMETER3= | |p3 = value: [[Number]] - desired value|PARAMETER3= | ||
| [[Boolean]] - [[true]] on success |RETURNVALUE= | | [[Boolean]] - [[true]] on success |RETURNVALUE= | ||
|x1 = Change value of CustomSoundController1 to 12<code>[[setCustomSoundController]] [<nowiki/>[[vehicle]] [[player]], "CustomSoundController1", 12];</code>|EXAMPLE1= | |x1 = Change value of CustomSoundController1 to 12<code>[[setCustomSoundController]] [<nowiki/>[[vehicle]] [[player]], "CustomSoundController1", 12];</code>|EXAMPLE1= | ||
| [[Arma 3 Sound]], [[getCustomSoundController]], [[getCustomSoundControllerCount]], [[getSoundController]], [[getSoundControllerResult]], [[getAllSoundControllers]], [[getEnvSoundController]], [[getAllEnvSoundControllers]] |SEEALSO= | | [[Arma 3 Sound]], [[getCustomSoundController]], [[getCustomSoundControllerCount]], [[getSoundController]], [[getSoundControllerResult]], [[getAllSoundControllers]], [[getEnvSoundController]], [[getAllEnvSoundControllers]] |SEEALSO= | ||
}} | }} |
Revision as of 02:34, 17 January 2021
Description
- Description:
- Sets value of the specified custom sound controller to be used in simple expressions in config. Returns true if value was set to the controller, false if command fails, for example if vehicle is not a transport or controller name is not recognised.
- Groups:
- Sounds
Syntax
- Syntax:
- setCustomSoundController [vehicle, controller, value]
- Parameters:
- vehicle: Object - must be a transport type vehicle (doesn't work on characters or buildings)
- controller: String - name of the custom sound controller. Need to be full string like i.e. "CustomSoundController1". Currently you can pick from "CustomSoundController1" to "CustomSoundController32"
- value: Number - desired value
- Return Value:
- Boolean - true on success
Examples
- Example 1:
- Change value of CustomSoundController1 to 12
setCustomSoundController [vehicle player, "CustomSoundController1", 12];
Additional Information
- See also:
- Arma 3 SoundgetCustomSoundControllergetCustomSoundControllerCountgetSoundControllergetSoundControllerResultgetAllSoundControllersgetEnvSoundControllergetAllEnvSoundControllers
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