checkAIFeature: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{since" to "{{Since")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma2 |Game name=
| arma2 |Game name=
Line 7: Line 6:


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation |GROUP1=
____________________________________________________________________________________________


| Checks if the 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:
Line 13: Line 11:
* <tt>"CombatFormationSoft"</tt>
* <tt>"CombatFormationSoft"</tt>
* [[disableAI]]/[[enableAI]] AI skill {{Since|arma3|1.95.145843|y}} |DESCRIPTION=
* [[disableAI]]/[[enableAI]] AI skill {{Since|arma3|1.95.145843|y}} |DESCRIPTION=
____________________________________________________________________________________________


| '''checkAIFeature''' feature |SYNTAX=
| '''checkAIFeature''' feature |SYNTAX=
Line 28: Line 25:


|r2=[[Boolean]] - [[true]] if is enabled |RETURNVALUE2=
|r2=[[Boolean]] - [[true]] if is enabled |RETURNVALUE2=
____________________________________________________________________________________________


|x1 = <code>_featureUsed = [[checkAIFeature]] "AwareFormationSoft";</code>|EXAMPLE1=
|x1 = <code>_featureUsed = [[checkAIFeature]] "AwareFormationSoft";</code>|EXAMPLE1=

Revision as of 00:18, 17 January 2021

Hover & click on the images for description

Description

Description:
Checks if the given AI feature is currently enabled. Feature may be one of:
Groups:
Object Manipulation

Syntax

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

Alternative Syntax

Syntax:
unit checkAIFeature feature Template:Since
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