checkAIFeature: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma2 |Game name=
| arma2


|1.05|Game version=
|1.05


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


| 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:
* <tt>"AwareFormationSoft"</tt>
* <tt>"AwareFormationSoft"</tt>
* <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}}


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


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


| [[Boolean]] - [[true]] if is enabled|RETURNVALUE=
| [[Boolean]] - [[true]] if is enabled


|s2= unit '''checkAIFeature''' feature {{Since|arma3|1.95.145843|y}} |SYNTAX2=
|s2= unit '''checkAIFeature''' feature {{Since|arma3|1.95.145843|y}}


|p21= unit: [[Object]] - unit to test AI feature for |PARAMETER21=
|p21= unit: [[Object]] - unit to test AI feature for |PARAMETER21=
Line 24: Line 24:
|p22= feature: [[String]] - [[disableAI]] / [[enableAI]] feature |PARAMETER22=
|p22= feature: [[String]] - [[disableAI]] / [[enableAI]] feature |PARAMETER22=


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


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


|x2 = <code>_autotargetOn = bob [[checkAIFeature]] "AUTOTARGET";</code>|EXAMPLE2=
|x2 = <code>_autotargetOn = bob [[checkAIFeature]] "AUTOTARGET";</code>


| [[enableAIFeature]], [[enableAI]], [[disableAI]] |SEEALSO=
| [[enableAIFeature]], [[enableAI]], [[disableAI]]
}}
}}



Revision as of 00:13, 18 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