Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:

Disables parts of the AI behavior, to get a better control over the actions of a unit.

Possible values are:

  • "ANIM" - Disables the AI ability to change animation.
  • "AUTOTARGET" - Prevents the unit from assigning a target independently and watching unknown objects.
  • "COLLISIONAVOID" (V1.33+) - Disables collision avoidance for vehicles (default is on).
  • "MOVE" - Disables the AI movement.
  • "GROUNDAVOID" (V1.31+) - Disables ground avoidance for aircraft (default is on).
  • "PATHPLAN" - Disables the AI path-planning, forcing the unit to move along a straight path through the waypoints (to disable path-planning for vehicles, apply this command to the driver).
  • "TARGET" - Stops the unit from watching the assigned target.
  • "THREAT_PATH" - Disables threat path-planning (avoiding threats).
  • "WAYPOINT_STOP" - (V2.09+) Prevents the AI driver from stopping at waypoints (due to waypoint planning).
  • "FSM" - Prevents the AI from executing their assigned formation and danger FSM.

Notes:

  • Disabling path-planning on persons also disables collision-detection (persons walk through walls to reach a waypoint). This does not apply to vehicles.
  • All effects of the command are cancelled after mission save or load.

Syntax

Syntax:unit disableAI skilltype
Parameters:
  • unit: Unit - AI unit.
  • skilltype: String - AI skill to manipulate (see description).
Return Value:Nothing

Examples

Examples:
_soldier1 disableAI "AUTOTARGET"

Additional Information

See also: enableAI, isEnabledAI
Multiplayer: 
Problems:In V3.x, AI drivers may not follow waypoints accurately, even if "PATHPLAN" and "COLLISIONAVOID" are disabled.

Notes







Posted on March 6, 2009 - 15:28
amontoya
In order for networked games to use this command, when trying to disable the AI on a person in a vehicle with a predefined crew (which you can create via the mission editor), in order for the statement to execute, you MUST place the statement inside the initialization statements for the DRIVER of the vehicle, not the vehicle itself. In other words, in the initialization statements for the vehicle, DO NOT call


driver this disableAI ...;

If you run the mission in "Preview" mode right from the Mission Editor using the above code, it will appear as if everything works normal (i.e. the AI is disabled for whatever specified parameter). However, if you try to run the mission as a true networked game, the command will be ignored, and the AI will not be disabled as desired (I tried this with "PATHPLAN" and "MOVE", but it should not matter what string you pass to the function).

Instead, in the DRIVER'S initialization statements, try

this disableAI ...;

This will ensure that the driver will have his AI disabled when he/she is created, which seems to occur after a respective empty vehicle is created in a networked game.


Posted on August 3, 2006 - 14:31
hardrock
Notes from ArmA (unverified in VBS2):


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).