enableAIFeature: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
No edit summary
 
(46 intermediate revisions by 4 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


| Enables/disables given AI feature. Feature may be one of:
|game3= tkoh
|version3= 1.00


* <tt>"AwareFormationSoft"</tt>
|game4= arma3
* <tt>"CombatFormationSoft"</tt>
|version4= 0.50


Since Arma 3 v1.95.145843 this command also supports [[disableAI]] / [[enableAI]] feature set via an alternative syntax.|DESCRIPTION=
|gr1= AI Behaviour
____________________________________________________________________________________________


| feature '''enableAIFeature''' enable |SYNTAX=
|descr= Enables/disables given AI feature.


|p1= feature: [[String]] (see description) |PARAMETER1=
|s1= feature [[enableAIFeature]] enable


|p2= enable: [[Boolean]] - [[true]] to enable, [[false]] - to disable |PARAMETER2=
|p1= feature: [[String]] - can be:
* {{hl|"AwareFormationSoft"}}
* {{hl|"CombatFormationSoft"}}


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


|s2= unit '''enableAIFeature''' [feature, enable] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(''Since Arma 3 v1.95.145843'')|SYNTAX2=
|r1= [[Nothing]]


|p21= unit: [[Object]] - unit to test AI feature for |PARAMETER21=
|s2= unit [[enableAIFeature]] [feature, enable]


|p22= [feature, enable]: [[Array]] |PARAMETER22=
|s2since= arma3 1.96


|p23= feature: [[String]] - [[disableAI]] / [[enableAI]] feature|PARAMETER23=
|p21= unit: [[Object]] - unit to test AI feature for


|p24= enabled: [[Boolean]] - [[true]] to enable, [[false]] - to disable|PARAMETER24=
|p22= feature: [[String]] - see [[disableAI]] / [[enableAI]] for possible values


|r2= [[Nothing]] |RETURNVALUE2=
|p23= enable: [[Boolean]] - [[true]] to enable, [[false]] to disable
____________________________________________________________________________________________
|x1 = <code>"AwareFormationSoft" [[enableAIFeature]] [[true]];</code>|EXAMPLE1=
|x2 = <code>bob [[enableAIFeature]] ["AUTOTARGET", [[false]]];</code>|EXAMPLE2=


| [[checkAIFeature]], [[enableAI]], [[disableAI]] |SEEALSO=
|r2= [[Nothing]]


}}
|x1= <sqf>"AwareFormationSoft" enableAIFeature true;</sqf>


<h3 style="display:none">Notes</h3>
|x2= <sqf>bob enableAIFeature ["AUTOTARGET", false];</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[checkAIFeature]] [[enableAI]] [[disableAI]] [[getUnitState]] [[disableRemoteSensors]] [[vehicleMoveInfo]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]

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