enableAI: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(79 intermediate revisions by 14 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|ENABLEAI]]
{{RV|type=command
[[Category:Scripting Commands OFP Elite |ENABLEAI]]
[[Category:Scripting Commands ArmA|ENABLEAI]]


|game1= ofpe
|version1= 1.00


|game2= arma1
|version2= 1.00


<h2 style="color:#000066">''unit'' ''''' enableAI ''''' ''section''</h2>
|game3= arma2
|version3= 1.00


|game4= arma2oa
|version4= 1.50


'''Operand types:'''
|game5= tkoh
|version5= 1.00


'''unit''': [[Object]]
|game6= arma3
|version6= 0.50


'''section''': [[String]]
|arg= local


'''Type of returned value:'''
|eff= global


[[Nothing]]
|gr1= AI Behaviour


'''Compatibility:'''
|descr= Enables parts of the AI behavior that was disabled by [[disableAI]].
{{Feature|important|When player switches and leaves behind AI unit, you need to enable "TeamSwitch" AI on it <sqf inline>_unit enableAI "TeamSwitch";</sqf> so that the unit continues with [[waypoints]].}}
{{Feature|arma3|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]].}}


Version 2.53 required.
|s1= unit [[enableAI]] skilltype


'''Description:'''
|p1= unit: [[Object]]


Enables parts of the AI behaviour. Section is one of "TARGET" (enables watching assigned targets), "AUTOTARGET" (enables independed target assigning and watching of unknown targets) or "MOVE" (enables movement).
|p2= skilltype: [[String]] - see [[disableAI]] for possible values.


|r1= [[Nothing]]


'''Example:'''
|x1= <sqf>_soldierOne enableAI "Move";</sqf>


soldierOne '''enableAI''' "Move"
|seealso= [[disableAI]] [[checkAIFeature]] [[enableAIFeature]] [[vehicleMoveInfo]] [[getUnitState]]
}}

Latest revision as of 13:39, 22 October 2024

Hover & click on the images for description

Description

Description:
Enables parts of the AI behavior that was disabled by disableAI.
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.
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.
Groups:
AI Behaviour

Syntax

Syntax:
unit enableAI skilltype
Parameters:
unit: Object
skilltype: String - see disableAI for possible values.
Return Value:
Nothing

Examples

Example 1:
_soldierOne enableAI "Move";

Additional Information

See also:
disableAI checkAIFeature enableAIFeature vehicleMoveInfo getUnitState

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