enableAudioFeature: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
m (Fix)
 
(27 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command
|arma3
 
|1.64
|game1= arma3
|arg=
|version1= 1.64
|eff=
 
|arg= global
|eff= local


|gr1= Sounds
|gr1= Sounds
| Enable/disable an audio feature, features are: "lowpass", "building_interior".
| [[enableAudioFeature]] [feature, enable]
|p1= feature: [[String]]
|p2= enable: [[Boolean]] - [[true]] enable, [[false]], disabled
| [[Boolean]] - Previous state
|x1= prevState = [[enableAudioFeature]] ["lowpass", [[true]]];
|
}}


<dl class='command_description'>
|descr= Get the state of '''or''' enable/disable an audio feature. Available features are {{hl|"lowpass"}} and {{hl|"building_interior"}}.
<!-- BEGIN Note Section -->
* {{GVI|arma3|2.14|size= 0.75}} it is possible to enable {{hl|"building_interior"}} on an object placed in a building.
<!-- For example:
* {{GVI|arma3|2.14|size= 0.75}} if 'enable' argument is omitted, the command returns the current state of the feature.
<dd class='notedate'>Posted on Month Day, Year - Time (UTC)</dd>
 
<dt class='note'>'''[[User:User Name|User Name]]'''</dt>
|mp= To use this command on objects in multiplayer, [[remoteExec]] it globally with JIP queue enabled:
<dd class='note'>This is an example note. It is true and verifiable, and contains a little code snippet.
<sqf>[_obj, ["building_interior", true]] remoteExec ["enableAudioFeature", 0, _obj];</sqf>
<code>[[if]] ([[_this]] == anExample) [[then]] { hint: Leave it here for others to read; };</code></dd>
 
-->
|s1= [[enableAudioFeature]] [feature, enable]
<!-- END Note Section -->
 
</dl>
|p1= feature: [[String]] - {{hl|"lowpass"}} or {{hl|"building_interior"}}
 
|p2= enable: [[Boolean]] - (Optional, getter if not provided) [[true]] enable, [[false]], disable
 
|r1= [[Boolean]] - previous state
 
|s2= object [[enableAudioFeature]] [feature, enable]
 
|s2since= arma3 2.14
 
|p21= object: [[Object]]
 
|p22= feature: [[String]] - {{hl|"building_interior"}} or {{hl|"building_exterior"}} only (mutually exclusive)
 
|p23= enable: [[Boolean]] - (Optional, getter if not provided) [[true]] enable, [[false]], disable
 
|r2= [[Boolean]] - previous state
 
|x1= <sqf>private _prevState = enableAudioFeature ["lowpass", true];</sqf>
 
|x2= <sqf>private _prevState = pallet enableAudioFeature ["building_interior", true];</sqf>
 
|x3= <sqf>
private _currState = pallet enableAudioFeature ["building_interior"];
private _prevState = pallet enableAudioFeature ["building_interior", !_currState];
hint str (_currState == _prevState); // true


<h3 style='display:none'>Bottom Section</h3>
private _currState = pallet enableAudioFeature ["building_interior"];
<!-- Appropriate categories go here -->
hint str (_currState == _prevState); // false
</sqf>


{{GameCategory|arma3|Scripting Commands}}
|seealso= [[insideBuilding]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
}}

Latest revision as of 11:41, 1 April 2024

Hover & click on the images for description

Description

Description:
Get the state of or enable/disable an audio feature. Available features are "lowpass" and "building_interior".
  • Arma 3 logo black.png2.14 it is possible to enable "building_interior" on an object placed in a building.
  • Arma 3 logo black.png2.14 if 'enable' argument is omitted, the command returns the current state of the feature.
Multiplayer:
To use this command on objects in multiplayer, remoteExec it globally with JIP queue enabled:
[_obj, ["building_interior", true]] remoteExec ["enableAudioFeature", 0, _obj];
Groups:
Sounds

Syntax

Syntax:
enableAudioFeature [feature, enable]
Parameters:
feature: String - "lowpass" or "building_interior"
enable: Boolean - (Optional, getter if not provided) true enable, false, disable
Return Value:
Boolean - previous state

Alternative Syntax

Syntax:
object enableAudioFeature [feature, enable]
Parameters:
object: Object
feature: String - "building_interior" or "building_exterior" only (mutually exclusive)
enable: Boolean - (Optional, getter if not provided) true enable, false, disable
Return Value:
Boolean - previous state

Examples

Example 1:
private _prevState = enableAudioFeature ["lowpass", true];
Example 2:
private _prevState = pallet enableAudioFeature ["building_interior", true];
Example 3:
private _currState = pallet enableAudioFeature ["building_interior"]; private _prevState = pallet enableAudioFeature ["building_interior", !_currState]; hint str (_currState == _prevState); // true private _currState = pallet enableAudioFeature ["building_interior"]; hint str (_currState == _prevState); // false

Additional Information

See also:
insideBuilding

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