checkAIFeature: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
(alt syntax)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Check if given AI feature is currently enabled. Feature may be one of:
| Checks if the given AI feature is currently enabled. Feature may be one of:


"AwareFormationSoft", "CombatFormationSoft". |DESCRIPTION=
* <tt>"AwareFormationSoft"</tt>
* <tt>"CombatFormationSoft"</tt>
 
Since Arma 3 v1.95.145843 this command also supports [[disableAI]] / [[enableAI]] feature set via an alternative syntax.|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''checkAIFeature''' feature |SYNTAX=
| '''checkAIFeature''' feature |SYNTAX=


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


| [[Boolean]] |RETURNVALUE=
| [[Boolean]] - [[true]] if is enabled|RETURNVALUE=
 
|s2= unit '''checkAIFeature''' feature &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(''Since Arma 3 v1.95.145843'')|SYNTAX2=
|p21= unit: [[Object]] - unit to test AI feature for |PARAMETER21=
|p22= feature: [[String]] - [[disableAI]] / [[enableAI]] feature |PARAMETER22=
 
|r2=[[Boolean]] - [[true]] if is enabled |RETURNVALUE2=
____________________________________________________________________________________________
____________________________________________________________________________________________
|x1 = <code> _featureUsed <nowiki>=</nowiki> '''checkAIFeature''' "AwareFormationSoft" </code>
|x1 = <code>_featureUsed = [[checkAIFeature]] "AwareFormationSoft";</code>|EXAMPLE1=
| [[enableAIFeature]] |SEEALSO=
 
|x2 = <code>_autotargetOn = bob [[checkAIFeature]] "AUTOTARGET";</code>|EXAMPLE2=
 
| [[enableAIFeature]], [[enableAI]], [[disableAI]] |SEEALSO=


}}
}}

Revision as of 19:30, 9 July 2019

Hover & click on the images for description

Description

Description:
Checks if the given AI feature is currently enabled. Feature may be one of:
  • "AwareFormationSoft"
  • "CombatFormationSoft"
Since Arma 3 v1.95.145843 this command also supports disableAI / enableAI feature set via an alternative syntax.
Groups:
Uncategorised

Syntax

Syntax:
checkAIFeature feature
Parameters:
feature: String (see description)
Return Value:
Boolean - true if is enabled

Alternative Syntax

Syntax:
unit checkAIFeature feature        (Since Arma 3 v1.95.145843)
Parameters:
unit: Object - unit to test AI feature for
feature: String - disableAI / enableAI feature
Return Value:
Boolean - true if is enabled

Examples

Example 1:
_featureUsed = checkAIFeature "AwareFormationSoft";
Example 2:
_autotargetOn = bob checkAIFeature "AUTOTARGET";

Additional Information

See also:
enableAIFeatureenableAIdisableAI

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

Notes

Bottom Section