disableAI: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:Scripting Commands OFP 1.[4-9]{2}(\|(\{\{uc:\{\{PAGENAME\}\}\}\}|#|[A-Z]+))?\]\] " to "")
(page revamp)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| ofp
|game1= ofp


|1.00
|version1= 1.00


|arg= local
|game2= ofpe
 
|version2= 1.00
 
|game3= arma1
 
|version3= 1.00


|eff= global
|game4= arma2


|gr1= Object Manipulation
|version4= 1.00


| Disables parts of the AI behaviour to get a better control over the actions of a unit. Must be executed where AI unit is [[local]]. If unit changes locality, it might need to be executed again at the new locality to maintain effect.
|game5= arma2oa


Possible values are:
|version5= 1.51
*'''"TARGET"''' - stop the unit to watch the assigned target / group commander may not assign targets
*'''"AUTOTARGET"''' - prevent the unit from assigning a target independently and watching unknown objects / no automatic target selection
*'''"MOVE"''' - disable the AI's movement / do not move
*'''"ANIM"''' - disable ability of AI to change animation. '''Available only since ArmA: Cold War Assault (OFP 1.99)'''.
*'''"TEAMSWITCH"''' - AI disabled because of Team Switch
*'''"FSM"''' - disable the execution of AI behavior scripts. '''Available only since Operation Arrowhead v1.60'''.
*'''"WEAPONAIM"''' - no weapon aiming
*'''"AIMINGERROR"''' - prevents AI's aiming from being distracted by its shooting, moving, turning, reloading, hit, injury, fatigue, suppression or concealed/lost target  '''Available only since Arma 3 v1.42'''.
*'''"SUPPRESSION"''' - prevents AI from being suppressed  '''Available only since Arma 3 v1.42'''.
*'''"CHECKVISIBLE"''' - disables visibility raycasts  '''Available only since Arma 3 v1.54'''.
*'''"COVER"''' - disables usage of cover positions by the AI  '''Available only since Arma 3 v1.56'''.
*'''"AUTOCOMBAT"''' - disables autonomous switching to [[2D_Editor:_Waypoints#Behaviour|COMBAT]] when in [[Arma_2:_FSM_Danger_Causes|danger]] '''Available only since Arma 3 v1.56'''.
*'''"PATH"''' - stops the AI’s movement but not the target alignment '''Available only since Arma 3 v1.61'''.
*'''"MINEDETECTION"''' - disable AI mine detection.
*'''"NVG"''' - Stops AI from putting NVGs on but not taking them off '''Available since Arma 3 v1.92'''
*'''"LIGHTS"''' - Stops AI from operating vehicle headlights as well as collision lights '''Available since Arma 3 v1.92'''
*'''"RADIOPROTOCOL"''' - Stops AI from talking and texting while still being able to issue orders '''Available since Arma 3 v1.95'''


Since Arma v1.65 a special operational keyword <tt>"all"</tt> is introduced to set all AI flags to the same value.<br><br>
|game6= tkoh
{{Feature|arma3 | Since Arma 3 v1.95.145843 it is possible to return the state of the given AI flag via [[checkAIFeature]] command or set it using alias command [[enableAIFeature]]}}


| unitName '''disableAI''' section
|version6= 1.00


|p1= unitName: [[Object]] - AI unit
|game7= arma3


|p2= section: [[String]]
|version7= 0.50


| [[Nothing]]
|arg= local
 
|x1= <code>_soldier1 [[disableAI]] "AUTOTARGET";</code>


|seealso= [[enableAI]], [[checkAIFeature]], [[enableAIFeature]], [[disableRemoteSensors]], [[vehicleMoveInfo]]
|eff= global
}}


<dl class="command_description">
|gr1= Object Manipulation
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on 26.9.2013</dd>
|descr= Disables parts of the AI behaviour to get a better control over the actions of a unit. If unit changes locality, it might need to be executed again at the new locality to maintain effect.
<dt class="note">[[User:Katulobotomia|Katulobotomia]]<dd class="note">
{{Feature|arma3|Since Arma 3 v1.96 it is possible to return the state of the given AI flag via [[checkAIFeature]] command or set it using alias command [[enableAIFeature]].}}


After substantial testing in {{arma3}} 1.01, the AI sections are as follows:<br>
|s1= unitName '''disableAI''' section


*'''MOVE:''' disabling this will stop units from turning and moving. Units will still change stance and fire at the enemy if the enemy happens to walk right in front of the barrel. Unit will watch enemies that are in their line of sight, but won't turn their bodies to face the enemy, only their head. Works for grouped units as well. Good for staging units and holding them completely still. Movement can't be controlled by a script either, you have to re-enable movement for that. Unit will still be able to aim within his cone of fire.
|p1= unitName: [[Object]] - AI unit


*'''AUTOTARGET:''' Essentially makes single units without a group, "deaf". The unit still goes prone and combat ready if he hears gunfire. They won't turn around when gunfire comes from the behind, but if an enemy walks in front they will target the enemy and fire as normal. WON'T WORK FOR GROUPED UNITS WITH A LEADER, the leader will assign targets to the units and effectively enables the AI back on.
|p2= section: [[String]] - Possible values are:


*'''TARGET:''' Will prevent units from engaging the target. Units still move around for cover etc...but won't hunt down the player. Works in groups as well. Excellent for keeping units inside bases or other areas without having them flank or engage anyone. They will still seek good cover if something is close by.


*'''ANIM:''' completely freezes the unit, including breathing. Won't even blink. No move command works until the unit is unfrozen.
{{{!}} class="wikitable"
{{!}}-
! Section !! Description !! Since
{{!}}-
{{!}} "TARGET" {{!}}{{!}} Will prevent units from engaging the target. Units still move around for cover etc...but won't hunt down the player. Works in groups as well. Excellent for keeping units inside bases or other areas without having them flank or engage anyone. They will still seek good cover if something is close by {{!}}{{!}} -
{{!}}-
{{!}} "AUTOTARGET" {{!}}{{!}} Essentially makes single units without a group, "deaf". The unit still goes prone and combat ready if he hears gunfire. They won't turn around when gunfire comes from the behind, but if an enemy walks in front they will target the enemy and fire as normal. WON'T WORK FOR GROUPED UNITS WITH A LEADER, the leader will assign targets to the units and effectively enables the AI back on {{!}}{{!}} -
{{!}}-
{{!}} "MOVE" {{!}}{{!}} Disabling this will stop units from turning and moving, including vehicles. Units will still change stance and fire at the enemy if the enemy happens to walk right in front of the barrel. Unit will watch enemies that are in their line of sight, but won't turn their bodies to face the enemy, only their head. Works for grouped units as well. Good for staging units and holding them completely still. Movement can't be controlled by a script either, you have to re-enable movement for that. Unit will still be able to aim within his cone of fire/ do not move {{!}}{{!}} -
{{!}}-
{{!}} "WEAPONAIM" {{!}}{{!}} No weapon aiming {{!}}{{!}} -
{{!}}-
{{!}} "TEAMSWITCH" {{!}}{{!}} AI disabled because of Team Switch {{!}}{{!}} -
{{!}}-
{{!}} "ANIM" {{!}}{{!}} Completely freezes the unit, including breathing. Won't even blink. No move command works until the unit is unfrozen {{!}}{{!}} {{GVI|ofp|1.99}}
{{!}}-
{{!}} "FSM" {{!}}{{!}} Example {{!}} Essentially makes the enemy "dumber". Enemies react slower to enemy fire and the enemy stops using hand signals. Disabling FSM, can give the impression of untrained units as they react slower and are more disorganized than when FSM is enabled. Good for rebel fighters and when enabled better for professional armies {{!}}{{!}}{{!}} {{GVI|arma2oa|1.60}}
{{!}}-
{{!}} "AIMINGERROR" {{!}}{{!}} Prevents AI's aiming from being distracted by its shooting, moving, turning, reloading, hit, injury, fatigue, suppression or concealed/lost target {{!}}{{!}} {{GVI|arma3|1.42}}
{{!}}-
{{!}} "SUPPRESSION" {{!}}{{!}} Prevents AI from being suppressed {{!}}{{!}} {{GVI|arma3|1.42}}
{{!}}-
{{!}} "CHECKVISIBLE" {{!}}{{!}} Disables visibility raycasts {{!}}{{!}} {{GVI|arma3|1.54}}
{{!}}-
{{!}} "COVER" {{!}}{{!}} Disables usage of cover positions by the AI {{!}}{{!}} {{GVI|arma3|1.56}}
{{!}}-
{{!}} "AUTOCOMBAT" {{!}}{{!}} Disables autonomous switching to [[2D_Editor:_Waypoints#Behaviour|COMBAT]] when in [[Arma_2:_FSM_Danger_Causes|danger]] {{!}}{{!}} {{GVI|arma3|1.56}}
{{!}}-
{{!}} "PATH" {{!}}{{!}} Stops the AI’s movement but not the target alignment {{!}}{{!}} {{GVI|arma3|1.62}}
{{!}}-
{{!}} "MINEDETECTION" {{!}}{{!}} Disable AI mine detection {{!}}{{!}} {{GVI|arma3|1.76}}
{{!}}-
{{!}} "NVG" {{!}}{{!}} Stops AI from putting NVGs on but not taking them off {{!}}{{!}} {{GVI|arma3|1.92}}
{{!}}-
{{!}} "LIGHTS" {{!}}{{!}} Stops AI from operating vehicle headlights as well as collision lights {{!}}{{!}} {{GVI|arma3|1.92}}
{{!}}-
{{!}} "RADIOPROTOCOL" {{!}}{{!}} Stops AI from talking and texting while still being able to issue orders {{!}}{{!}} {{GVI|arma3|1.96}}
{{!}}-
{{!}} "all" {{!}}{{!}} Disables all the above sections {{!}}{{!}} {{GVI|arma3|1.66}}
{{!}}}


*'''FSM:''' Essentially makes the enemy "dumber". Enemies react slower to enemy fire and the enemy stops using hand signals. Disabling FSM, can give the impression of untrained units as they react slower and are more disorganized than when FSM is enabled. Good for rebel fighters and when enabled better for professional armies.
|r1= [[Nothing]]
 
|x1= <code>_soldier1 [[disableAI]] "AUTOTARGET";</code>


|seealso= [[enableAI]], [[checkAIFeature]], [[enableAIFeature]], [[disableRemoteSensors]], [[vehicleMoveInfo]]
}}


<dl class="command_description">
<dd class="notedate">Posted on August 3, 2006 - 14:31</dd>
<dd class="notedate">Posted on August 3, 2006 - 14:31</dd>
<dt class="note">[[User:Hardrock|hardrock]]<dd class="note">''Notes from before the conversion:''
<dt class="note">[[User:Hardrock|hardrock]]<dd class="note">''Notes from before the conversion:''
Line 83: Line 110:
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}


<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
Line 97: Line 117:
<dd class="note">
<dd class="note">
Beware that disabling "TARGET" AI to units in the player's group will disable the ability to execute engage orders issued by the player.
Beware that disabling "TARGET" AI to units in the player's group will disable the ability to execute engage orders issued by the player.
</dd>
<dd class="notedate">Posted on August 24, 2016 - 09:02 (UTC)</dd>
<dt class="note">[[User:R3vo|R3vo]]</dt>
<dd class="note">
As of version 1.65 dev., '''disableAI''' "MOVE" will also stop vehicles driven by AI.
</dd>
</dd>


Line 121: Line 135:
<dt class="note">[[User:zwobot|zwobot]]</dt>
<dt class="note">[[User:zwobot|zwobot]]</dt>
<dd class="note">
<dd class="note">
In '''{{ofp}}/Cold War Assault''', the disabled units are reset after a [[saveGame]] is executed (or the user manually saves the mission), i. e. the units will behave as if the disableAI command was never applied to them. Also in OFP there is no way to undo this command.
In '''{{ofp}}/Cold War Assault''', the disabled units are reset after a [[saveGame]] is executed or the user manually saves the mission, i. e. the units will behave as if the [[disableAI]] command was never applied to them. Also in {{ofp}} there is no way to undo this command.
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 09:27, 1 April 2021

Hover & click on the images for description

Description

Description:
Disables parts of the AI behaviour to get a better control over the actions of a unit. If unit changes locality, it might need to be executed again at the new locality to maintain effect.
Arma 3
Since Arma 3 v1.96 it is possible to return the state of the given AI flag via checkAIFeature command or set it using alias command enableAIFeature.
Groups:
Object Manipulation

Syntax

Syntax:
unitName disableAI section
Parameters:
unitName: Object - AI unit
section: String - Possible values are:
Section Description Since
"TARGET" Will prevent units from engaging the target. Units still move around for cover etc...but won't hunt down the player. Works in groups as well. Excellent for keeping units inside bases or other areas without having them flank or engage anyone. They will still seek good cover if something is close by -
"AUTOTARGET" Essentially makes single units without a group, "deaf". The unit still goes prone and combat ready if he hears gunfire. They won't turn around when gunfire comes from the behind, but if an enemy walks in front they will target the enemy and fire as normal. WON'T WORK FOR GROUPED UNITS WITH A LEADER, the leader will assign targets to the units and effectively enables the AI back on -
"MOVE" Disabling this will stop units from turning and moving, including vehicles. Units will still change stance and fire at the enemy if the enemy happens to walk right in front of the barrel. Unit will watch enemies that are in their line of sight, but won't turn their bodies to face the enemy, only their head. Works for grouped units as well. Good for staging units and holding them completely still. Movement can't be controlled by a script either, you have to re-enable movement for that. Unit will still be able to aim within his cone of fire/ do not move -
"WEAPONAIM" No weapon aiming -
"TEAMSWITCH" AI disabled because of Team Switch -
"ANIM" Completely freezes the unit, including breathing. Won't even blink. No move command works until the unit is unfrozen Logo A0.png1.99
"FSM" Essentially makes the enemy "dumber". Enemies react slower to enemy fire and the enemy stops using hand signals. Disabling FSM, can give the impression of untrained units as they react slower and are more disorganized than when FSM is enabled. Good for rebel fighters and when enabled better for professional armies A2 OA Logo.png1.60
"AIMINGERROR" Prevents AI's aiming from being distracted by its shooting, moving, turning, reloading, hit, injury, fatigue, suppression or concealed/lost target Arma 3 logo black.png1.42
"SUPPRESSION" Prevents AI from being suppressed Arma 3 logo black.png1.42
"CHECKVISIBLE" Disables visibility raycasts Arma 3 logo black.png1.54
"COVER" Disables usage of cover positions by the AI Arma 3 logo black.png1.56
"AUTOCOMBAT" Disables autonomous switching to COMBAT when in danger Arma 3 logo black.png1.56
"PATH" Stops the AI’s movement but not the target alignment Arma 3 logo black.png1.62
"MINEDETECTION" Disable AI mine detection Arma 3 logo black.png1.76
"NVG" Stops AI from putting NVGs on but not taking them off Arma 3 logo black.png1.92
"LIGHTS" Stops AI from operating vehicle headlights as well as collision lights Arma 3 logo black.png1.92
"RADIOPROTOCOL" Stops AI from talking and texting while still being able to issue orders Arma 3 logo black.png1.96
"all" Disables all the above sections Arma 3 logo black.png1.66
Return Value:
Nothing

Examples

Example 1:
_soldier1 disableAI "AUTOTARGET";

Additional Information

See also:
enableAIcheckAIFeatureenableAIFeaturedisableRemoteSensorsvehicleMoveInfo

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
Posted on August 3, 2006 - 14:31
hardrock
Notes from before the conversion: The "TARGET" section of the AI is likely different than what you would think. Normally, when an AI group is standing still and sees an enemy, the group will break formation and start moving towards the enemy. If you disable the "TARGET" AI, then the AI units will stay where they are at. Even if you disable the "MOVE" AI, the units will still move out to attack the enemy, unless you disable the "TARGET" AI. Disabling both these AI sections is useful when placing units in defensive positions. This way, you can have them stay behind their cover, and not run out into the open. This command has also a bug: after mission save or load the effect will be no longer active and you must set it again. It's also good way to detect number of saves and loads (loads can be recognized using time command).
Posted on Feb 7, 2009 - 14:31
GeneralCarver
Multiplayer Use as of ArmA v1.14: Contrary to the post above, using this command WILL disable A.I. movement ability if used with the "MOVE" parameter. Works even when the A.I. is grouped with other units. I use this command to set up stationary targets at objectives all the time. Works on a dedicated server.
Posted on September 19, 2015 - 09:00 (UTC)
Kenoxite
Beware that disabling "TARGET" AI to units in the player's group will disable the ability to execute engage orders issued by the player.
Posted on September 26, 2016 - 19:34 (UTC)
James
Command is buggy in version 1.64.138497 as it disables the ability to drive vehicles for players. Tested with player disableAI "move". Entering a vehicle is possible, but not starting the engine. player enableAI "move" enables the player to drive again. Already in the feedback tracker: https://feedback.bistudio.com/T120346
Posted on Januaary 21, 2017 - 12:30 (UTC)
ilias48rus
Does not lower CPU usage of still AI without enemies in range
Posted on June 5, 2018 - 19:29 (UTC)
zwobot
In Operation Flashpoint/Cold War Assault, the disabled units are reset after a saveGame is executed or the user manually saves the mission, i. e. the units will behave as if the disableAI command was never applied to them. Also in Operation Flashpoint there is no way to undo this command.