enableAI: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(65 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= ofpe
|version1= 1.00


|1.00|= Game version
|game2= arma1
____________________________________________________________________________________________
|version2= 1.00


| Enables parts of the AI behaviour. Section is one of:
|game3= arma2
|version3= 1.00


*'''"TARGET"''' - enables watching assigned targets
|game4= arma2oa
*'''"AUTOTARGET"''' - enables independed target assigning and watching of unknown targets
|version4= 1.50
*'''"MOVE"''' - enables movement.
*'''"ANIM"''' - enables animation. |= Description
____________________________________________________________________________________________


| unit '''enableAI''' section |= Syntax
|game5= tkoh
|version5= 1.00


|p1= unit: [[Object]]  |= Parameter 1
|game6= arma3
|version6= 0.50


|p2= section: [[String]] |= Parameter 2
|arg= local


| [[Nothing]] |= Return value
|eff= global
____________________________________________________________________________________________
 
|x1= <pre>_soldierOne enableAI "Move"</pre> |= Example 1
____________________________________________________________________________________________


| [[disableAI]], [[disableAI_(VBS2)]] |= See also
|gr1= AI Behaviour


}}
|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]].}}


<h3 style="display:none">Notes</h3>
|s1= unit [[enableAI]] skilltype
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on Mar 19, 2010 - 14:39</dd>
|p1= unit: [[Object]]
<dt class="note">'''[[User:TijmenJoppe|TijmenJoppe]]'''</dt>
<dd class="note">
''Multiplayer Use for VBS2:''


The [[disableAI]] and enableAI commands need to be executed on the server or client where target unit is local. In other words: executing the command in a script on the server on a unit that is remote to that server (and local to one of the network clients) will have no effect.
|p2= skilltype: [[String]] - see [[disableAI]] for possible values.
</dd>


<!-- Note Section END -->
|r1= [[Nothing]]
</dl>


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>_soldierOne enableAI "Move";</sqf>


[[Category:Scripting Commands|ENABLEAI]]
|seealso= [[disableAI]] [[checkAIFeature]] [[enableAIFeature]] [[vehicleMoveInfo]]
[[Category:Scripting Commands OFP Elite |ENABLEAI]]
}}
[[Category:Scripting Commands ArmA|ENABLEAI]]
[[Category:Command_Group:_Unit_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands VBS2|{{uc:{{PAGENAME}}}}]]

Latest revision as of 17:40, 27 July 2023

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

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