{"name":"setCustomSoundController","operator":null,"title":"setCustomSoundController","type":"command","url":"https://community.bistudio.com/wiki/setCustomSoundController","revid":309208,"updated":"2022-05-03T22:18:23Z","groups":["Sounds"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.86"}],"since":{"game":"arma3","name":"Arma 3","version":"1.86"},"arma3_since":"1.86","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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.\n\n> [!IMPORTANT]\n> Custom sound controller name is case sensitive and of the following format:\n>\n> ```sqf\n> format [\"CustomSoundController%1\", _number];\n> ```\n>\n> Where `_number` is a number from 1 to getCustomSoundControllerCount (currently 32)","syntaxes":[{"syntax":"setCustomSoundController [vehicle, controller, value]","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"a transport type vehicle. Does not work on characters or buildings","types":["Object"],"since":null,"text":"vehicle: Object - a transport type vehicle. Does not work on characters or buildings"},{"name":"controller","type":"String","optional":false,"default":null,"description":"name of the custom sound controller - needs to be full string e.g \"CustomSoundController1\". It goes from \"CustomSoundController1\" to \"CustomSoundController32\"","types":["String"],"since":null,"text":"controller: String - name of the custom sound controller - needs to be full string e.g \"CustomSoundController1\". It goes from \"CustomSoundController1\" to \"CustomSoundController32\""},{"name":"value","type":"Number","optional":false,"default":null,"description":"desired value","types":["Number"],"since":null,"text":"value: Number - desired value"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true on success","text":"Boolean - true on success"},"form":"unary","operator":null,"left":null,"right":{"text":"[vehicle, controller, value]","types":["Array"]}}],"examples":[{"text":"Change value of CustomSoundController1 to 12\n\n```sqf\nsetCustomSoundController [vehicle player, \"CustomSoundController1\", 12];\n```","code":["setCustomSoundController [vehicle player, \"CustomSoundController1\", 12];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Arma 3: Sound","getCustomSoundController","getCustomSoundControllerCount","getSoundController","getSoundControllerResult","getAllSoundControllers","getEnvSoundController","getAllEnvSoundControllers"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Sounds","Introduced with Arma 3 version 1.86","Scripting Commands"]}