enableAIFeature: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
No edit summary
 
(29 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma2
|game1= arma2
|version1= 1.05


|1.05
|game2= arma2oa
|version2= 1.50


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


|gr2= Unit Control
|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.}}
|s1= feature [[enableAIFeature]] enable


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


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


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


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


|s2= unit '''enableAIFeature''' [feature, enable] {{Since|arma3|1.95.145843|true}}
|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]]
|x1= <sqf>"AwareFormationSoft" enableAIFeature true;</sqf>
|x1 = <code>"AwareFormationSoft" [[enableAIFeature]] [[true]];</code>
|x2 = <code>bob [[enableAIFeature]] ["AUTOTARGET", [[false]]];</code>


| [[checkAIFeature]], [[enableAI]], [[disableAI]], [[disableRemoteSensors]], [[vehicleMoveInfo]]
|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>
[[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