setCustomSoundController: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ")
m (Text replacement - " \|(x[0-9]|p[0-9]{1,2}|descr|game[0-9]|version[0-9]|s[0-9]|exec|r[0-9]|arg|eff|branch|serverExec|gr[0-9]|mp|pr|seealso) +=" to " |$1=")
Line 13: Line 13:
|s1= '''setCustomSoundController''' [vehicle, controller, value]
|s1= '''setCustomSoundController''' [vehicle, controller, value]


|p1 = vehicle: [[Object]] - A transport type vehicle. Does not work on characters or buildings
|p1= vehicle: [[Object]] - A transport type vehicle. Does not 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


|r1= [[Boolean]] - [[true|True]] on success
|r1= [[Boolean]] - [[true|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>


|seealso= [[Arma 3: Sound]], [[getCustomSoundController]], [[getCustomSoundControllerCount]], [[getSoundController]], [[getSoundControllerResult]], [[getAllSoundControllers]], [[getEnvSoundController]], [[getAllEnvSoundControllers]]
|seealso= [[Arma 3: Sound]], [[getCustomSoundController]], [[getCustomSoundControllerCount]], [[getSoundController]], [[getSoundControllerResult]], [[getAllSoundControllers]], [[getEnvSoundController]], [[getAllEnvSoundControllers]]
}}
}}

Revision as of 23:29, 10 June 2021

Hover & click on the images for description

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.
Custom sound controller name is case sensitive and of the following format:

format ["CustomSoundController%1", _number]

Where _number is a number from 1 to getCustomSoundControllerCount (currently 32)
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. 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 12setCustomSoundController [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