disableAI

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Operation Flashpoint version 1.00Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are not broadcasted over the network and remain local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint
Version:
1.00

Description

Description:
Disable parts of the AI behaviour to get a better control over the actions of a unit.

Possible values are:

  • "TARGET" - stop the unit to watch the assigned target
  • "AUTOTARGET" - prevent the unit from assigning a target independently and watching unknown objects
  • "MOVE" - disable the AI's movement
  • "ANIM" - disable ability of AI to change animation. Available only in Armed Assault.

Note: All effects of disableAI command are cancelled after mission save or load.

Note: In OFP is no way to undo this command.

Syntax

Syntax:
Unit disableAI "AiType"
Parameters:
Unit - AI unit
AiType: String
Return Value:
Nothing

Examples

Example 1:
_soldier1 disableAI "AUTOTARGET"

Additional Information

Multiplayer:
Behaviour unknown.
See also:
enableAI

Notes

Notes

+ Add Note

Only post proven facts here. Use the talk page or the forums for discussions.

Notes

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

Bottom Section

Personal tools
Buy ArmA now!