enableAIFeature: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Feature Arma3" to "Feature arma3")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *U([a-z ])" to "$1 - u$2")
 
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.05


|1.05|Game version=
|game2= arma2oa
|version2= 1.50


|gr1= System |GROUP1=
|game3= tkoh
|version3= 1.00


|gr2= Unit Control |GROUP2=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| Enables/disables given AI feature. Feature may be one of:
|gr1= AI Behaviour


* <tt>"AwareFormationSoft"</tt>
|descr= Enables/disables given AI feature.
* <tt>"CombatFormationSoft"</tt>


{{Feature arma3 | Since Arma 3 v1.95.145843 this command also supports [[disableAI]] / [[enableAI]] feature set via an alternative syntax.}}|DESCRIPTION=
|s1= feature [[enableAIFeature]] enable
____________________________________________________________________________________________


| feature '''enableAIFeature''' enable |SYNTAX=
|p1= feature: [[String]] - can be:
* {{hl|"AwareFormationSoft"}}
* {{hl|"CombatFormationSoft"}}


|p1= feature: [[String]] (see description) |PARAMETER1=
|p2= enable: [[Boolean]] - [[true]] to enable, [[false]] to disable


|p2= enable: [[Boolean]] - [[true]] to enable, [[false]] - to disable |PARAMETER2=
|r1= [[Nothing]]


| [[Nothing]] |RETURNVALUE=
|s2= unit [[enableAIFeature]] [feature, enable]


|s2= unit '''enableAIFeature''' [feature, enable] {{since|arma3|1.95.145843|true}}|SYNTAX2=
|s2since= arma3 1.96


|p21= unit: [[Object]] - unit to test AI feature for |PARAMETER21=
|p21= unit: [[Object]] - unit to test AI feature for


|p22= [feature, enable]: [[Array]] |PARAMETER22=
|p22= feature: [[String]] - see [[disableAI]] / [[enableAI]] for possible values


|p23= feature: [[String]] - [[disableAI]] / [[enableAI]] feature|PARAMETER23=
|p23= enable: [[Boolean]] - [[true]] to enable, [[false]] to disable


|p24= enabled: [[Boolean]] - [[true]] to enable, [[false]] - to disable|PARAMETER24=
|r2= [[Nothing]]


|r2= [[Nothing]] |RETURNVALUE2=
|x1= <sqf>"AwareFormationSoft" enableAIFeature true;</sqf>
____________________________________________________________________________________________
|x1 = <code>"AwareFormationSoft" [[enableAIFeature]] [[true]];</code>|EXAMPLE1=
|x2 = <code>bob [[enableAIFeature]] ["AUTOTARGET", [[false]]];</code>|EXAMPLE2=


| [[checkAIFeature]], [[enableAI]], [[disableAI]], [[disableRemoteSensors]], [[vehicleMoveInfo]] |SEEALSO=
|x2= <sqf>bob enableAIFeature ["AUTOTARGET", false];</sqf>


|seealso= [[checkAIFeature]] [[enableAI]] [[disableAI]] [[disableRemoteSensors]] [[vehicleMoveInfo]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:52, 8 November 2023

Hover & click on the images for description

Description

Description:
Enables/disables given AI feature.
Groups:
AI Behaviour

Syntax

Syntax:
feature enableAIFeature enable
Parameters:
feature: String - can be:
  • "AwareFormationSoft"
  • "CombatFormationSoft"
enable: Boolean - true to enable, false to disable
Return Value:
Nothing

Alternative Syntax

Syntax:
unit enableAIFeature [feature, enable]
Parameters:
unit: Object - unit to test AI feature for
feature: String - see disableAI / enableAI for possible values
enable: Boolean - true to enable, false to disable
Return Value:
Nothing

Examples

Example 1:
"AwareFormationSoft" enableAIFeature true;
Example 2:
bob enableAIFeature ["AUTOTARGET", false];

Additional Information

See also:
checkAIFeature enableAI disableAI disableRemoteSensors vehicleMoveInfo

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