setCustomSoundController: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <nowiki>[</nowiki>" to " [<nowiki/>")
m (Some wiki formatting)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.86


|1.85|Game version=
|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>
|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.
{{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:
<code>[[format]] ["CustomSoundController%1", _number]</code>
<sqf>format ["CustomSoundController%1", _number];</sqf>
Where <tt>_number</tt> is a number from 1 to [[getCustomSoundControllerCount]] (currently 32)}} |DESCRIPTION=
Where {{hl|_number}} is a number from 1 to [[getCustomSoundControllerCount]] (currently 32)}}
____________________________________________________________________________________________


| '''setCustomSoundController''' [vehicle, controller, value]|SYNTAX=
|s1= [[setCustomSoundController]] [vehicle, controller, value]
|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"|=
|p3 = value: [[Number]] - desired value|=
| [[Bool]] - [[true]] on success |Return value=
____________________________________________________________________________________________
|x1 = Change value of CustomSoundController1 to 12<code>[[setCustomSoundController]] [<nowiki/>[[vehicle]] [[player]], "CustomSoundController1", 12];</code>|EXAMPLE1=


____________________________________________________________________________________________
|p1= vehicle: [[Object]] - a transport type vehicle. Does not work on characters or buildings
| [[Arma 3 Sound]], [[getCustomSoundController]], [[getCustomSoundControllerCount]], [[getSoundController]], [[getSoundControllerResult]], [[getAllSoundControllers]], [[getEnvSoundController]], [[getAllEnvSoundControllers]]  |SEEALSO=
 
}}
|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]] - desired value


<h3 style="display:none">Notes</h3>
|r1= [[Boolean]] - [[true]] on success
<dl class="command_description">


|x1= Change value of CustomSoundController1 to 12
<sqf>setCustomSoundController [vehicle player, "CustomSoundController1", 12];</sqf>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[Arma 3: Sound]] [[getCustomSoundController]] [[getCustomSoundControllerCount]] [[getSoundController]] [[getSoundControllerResult]] [[getAllSoundControllers]] [[getEnvSoundController]] [[getAllEnvSoundControllers]]
[[Category:Scripting Commands|setCustomSoundController]]
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Latest revision as of 23:18, 3 May 2022

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 - 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
setCustomSoundController [vehicle player, "CustomSoundController1", 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