setCustomSoundController: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|s([0-9])\= '''([^' ]+)'''([^ ]+) " to "|s$1= $2$3 ") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
|descr= 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. | |descr= 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. | ||
{{Feature | important | Custom sound controller name is <u>case sensitive</u> and of the following format: | {{Feature | important | Custom sound controller name is <u>case sensitive</u> and of the following format: | ||
< | <sqf>format ["CustomSoundController%1", _number];</sqf> | ||
Where | Where {{hl|_number}} is a number from 1 to [[getCustomSoundControllerCount]] (currently 32)}} | ||
|s1= [[setCustomSoundController]] [vehicle, controller, value] | |s1= [[setCustomSoundController]] [vehicle, controller, value] | ||
|p1= vehicle: [[Object]] - | |p1= vehicle: [[Object]] - a transport type vehicle. Does not work on characters or buildings | ||
|p2= controller: [[String]] - | |p2= controller: [[String]] - name of the custom sound controller - needs to be full string e.g "CustomSoundController1". It goes from "CustomSoundController1" to "CustomSoundController32" | ||
|p3= value: [[Number]] - | |p3= value: [[Number]] - desired value | ||
|r1= [[Boolean]] - [[true | |r1= [[Boolean]] - [[true]] on success | ||
|x1= Change value of CustomSoundController1 to 12< | |x1= Change value of CustomSoundController1 to 12 | ||
<sqf>setCustomSoundController [vehicle player, "CustomSoundController1", 12];</sqf> | |||
|seealso= [[Arma 3: Sound]] | |seealso= [[Arma 3: Sound]] [[getCustomSoundController]] [[getCustomSoundControllerCount]] [[getSoundController]] [[getSoundControllerResult]] [[getAllSoundControllers]] [[getEnvSoundController]] [[getAllEnvSoundControllers]] | ||
}} | }} |
Latest revision as of 23:18, 3 May 2022
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 - a transport type vehicle. Does not work on characters or buildings
- controller: String - name of the custom sound controller - needs to be full string e.g "CustomSoundController1". It goes from "CustomSoundController1" to "CustomSoundController32"
- value: Number - desired value
- Return Value:
- Boolean - true on success
Examples
- Example 1:
- Change value of CustomSoundController1 to 12
Additional Information
- See also:
- Arma 3: Sound getCustomSoundController getCustomSoundControllerCount getSoundController getSoundControllerResult getAllSoundControllers getEnvSoundController getAllEnvSoundControllers
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