setCustomSoundController: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
(format, not about case sensitivity)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Set value of specified custom sound controller. Return true if value was set to the controller, false if not|DESCRIPTION=
| Sets value of the specified custom sound controller to be used in [[simple expression]]s. 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:
<code>[[format]] ["CustomSoundController%1", _number]</code>
Where <tt>_number</tt> is a number from 1 to [[getCustomSoundControllerCount]] (currently 32)}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''setCustomSoundController''' [vehicle,controller name, value]|SYNTAX=
| '''setCustomSoundController''' [vehicle, controller, value]|SYNTAX=
|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 name: [[String]] - name of 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|=
| [[Bool]] |Return value=
| [[Bool]] - [[true]] on success |Return value=
____________________________________________________________________________________________
____________________________________________________________________________________________
|x1 = <code>[[setCustomSoundController]] [ [[cameraOn]] ,"CustomSoundController1",12];</code>
|x1 = Change value of CustomSoundController1 to 12<code>[[setCustomSoundController]] <nowiki>[</nowiki>[[vehicle]] [[player]], "CustomSoundController1", 12];</code>|EXAMPLE1=
<pre>Above line will change value of CustomSoundController1 to 12
</pre> |EXAMPLE1=


____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 10:34, 3 May 2019

Hover & click on the images for description

Description

Description:
Sets value of the specified custom sound controller to be used in simple expressions. 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:
Uncategorised

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:
Bool - true on success

Examples

Example 1:
Change value of CustomSoundController1 to 12setCustomSoundController [vehicle player, "CustomSoundController1", 12];

Additional Information

See also:
Arma 3 SoundgetCustomSoundControllergetCustomSoundControllerCount

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

Notes

Bottom Section