setCustomSoundController: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.85 | |1.85 | ||
|gr1= Sounds | |gr1= Sounds | ||
| 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> | ||
{{Important | Custom sound controller name is <u>case sensitive</u> and of the following format: | {{Important | Custom sound controller name is <u>case sensitive</u> and of the following format: | ||
<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)}} | Where <tt>_number</tt> is a number from 1 to [[getCustomSoundControllerCount]] (currently 32)}} | ||
| '''setCustomSoundController''' [vehicle, controller, value] | | '''setCustomSoundController''' [vehicle, controller, value] | ||
|p1 = vehicle: [[Object]] - must be a transport type vehicle (doesn't work on characters or buildings) | |p1 = vehicle: [[Object]] - must be a transport type vehicle (doesn't work on characters or buildings) | ||
|p2 = 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" | |p2 = 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" | ||
|p3 = value: [[Number]] - desired value | |p3 = value: [[Number]] - desired value | ||
| [[Boolean]] - [[true]] on success | | [[Boolean]] - [[true]] on success | ||
|x1 = Change value of CustomSoundController1 to 12<code>[[setCustomSoundController]] [<nowiki/>[[vehicle]] [[player]], "CustomSoundController1", 12];</code> | |x1 = Change value of CustomSoundController1 to 12<code>[[setCustomSoundController]] [<nowiki/>[[vehicle]] [[player]], "CustomSoundController1", 12];</code> | ||
| [[Arma 3 Sound]], [[getCustomSoundController]], [[getCustomSoundControllerCount]], [[getSoundController]], [[getSoundControllerResult]], [[getAllSoundControllers]], [[getEnvSoundController]], [[getAllEnvSoundControllers]] | | [[Arma 3 Sound]], [[getCustomSoundController]], [[getCustomSoundControllerCount]], [[getSoundController]], [[getSoundControllerResult]], [[getAllSoundControllers]], [[getEnvSoundController]], [[getAllEnvSoundControllers]] | ||
}} | }} | ||
Revision as of 11:10, 18 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