enableAIFeature: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
No edit summary
 
(31 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]] [[getUnitState]] [[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}}}}]]
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 13:51, 22 October 2024

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 getUnitState 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