{"name":"enableAI","title":"enableAI","type":"command","url":"https://community.bistudio.com/wiki/enableAI","revid":369964,"updated":"2024-10-22T12:39:51Z","groups":["AI Behaviour"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Enables parts of the AI behavior that was disabled by disableAI.\n\n> [!IMPORTANT]\n> When player switches and leaves behind AI unit, you need to enable \"TeamSwitch\" AI on it `_unit enableAI \"TeamSwitch\";` so that the unit continues with waypoints.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.96 it is possible to return the state of the given AI flag via checkAIFeature or set it using alias command enableAIFeature.","syntaxes":[{"syntax":"unit enableAI skilltype","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"skilltype","type":"String","description":"see disableAI for possible values.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"skilltype"}}],"examples":[{"code":["_soldierOne enableAI \"Move\";"]}],"see_also":["disableAI","checkAIFeature","enableAIFeature","vehicleMoveInfo","getUnitState"]}