{"name":"checkAIFeature","operator":null,"title":"checkAIFeature","type":"command","url":"https://community.bistudio.com/wiki/checkAIFeature","revid":369971,"updated":"2024-10-22T12:51:32Z","groups":["AI Behaviour"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.05"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.05"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Checks if the given AI feature is currently enabled.","syntaxes":[{"syntax":"checkAIFeature feature","since":null,"effect":null,"exec":null,"params":[{"name":"feature","type":"String","optional":false,"default":null,"description":"can be one of:\n- `\"AwareFormationSoft\"`\n- `\"CombatFormationSoft\"`\n- AI skill - see disableAI#Syntax 1 (since Arma 3 v1.96)","types":["String"],"since":null,"text":"feature: String - can be one of:\n- `\"AwareFormationSoft\"`\n- `\"CombatFormationSoft\"`\n- AI skill - see disableAI#Syntax 1 (since Arma 3 v1.96)"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true if is enabled","text":"Boolean - true if is enabled"},"form":"unary","operator":null,"left":null,"right":{"text":"feature","types":["String"]}},{"syntax":"unit checkAIFeature feature","since":"arma3 1.96","effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":"unit to test AI feature for","types":["Object"],"since":null,"text":"unit: Object - unit to test AI feature for"},{"name":"feature","type":"String","optional":false,"default":null,"description":"disableAI / enableAI feature","types":["String"],"since":null,"text":"feature: String - disableAI / enableAI feature"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true if is enabled","text":"Boolean - true if is enabled"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"feature","types":["String"]}}],"examples":[{"text":"```sqf\n_featureUsed = checkAIFeature \"AwareFormationSoft\";\n```","code":["_featureUsed = checkAIFeature \"AwareFormationSoft\";"]},{"text":"```sqf\n_autotargetOn = bob checkAIFeature \"AUTOTARGET\";\n```","code":["_autotargetOn = bob checkAIFeature \"AUTOTARGET\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["enableAIFeature","enableAI","getUnitState","disableAI"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: AI Behaviour","Introduced with Arma 2 version 1.05","Scripting Commands","Take On Helicopters: Scripting Commands"]}