{"name":"checkAIFeature","title":"checkAIFeature","type":"command","url":"https://community.bistudio.com/wiki/checkAIFeature","revid":369971,"updated":"2024-10-22T12:51:32Z","groups":["AI Behaviour"],"status":"ok","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Checks if the given AI feature is currently enabled.","syntaxes":[{"syntax":"checkAIFeature feature","params":[{"name":"feature","type":"String","description":"can be one of:\n\n- `\"AwareFormationSoft\"`\n- `\"CombatFormationSoft\"`\n- AI skill - see disableAI - Syntax 1 (since Arma 3 v1.96)","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if is enabled"},"form":"unary","right":{"text":"feature"}},{"syntax":"unit checkAIFeature feature","since":"arma3 1.96","params":[{"name":"unit","type":"Object","description":"unit to test AI feature for","type_expr":"Object"},{"name":"feature","type":"String","description":"disableAI / enableAI feature","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if is enabled"},"form":"binary","left":{"text":"unit"},"right":{"text":"feature"}}],"examples":[{"code":["_featureUsed = checkAIFeature \"AwareFormationSoft\";"]},{"code":["_autotargetOn = bob checkAIFeature \"AUTOTARGET\";"]}],"see_also":["enableAIFeature","enableAI","getUnitState","disableAI"]}