disableAI (VBS2)

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Virtual Battlespace 2 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:
Virtual Battlespace 2
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.
  • "PATHPLAN" - AI will follow waypoints on a straight path, disregarding any obstacles and physical barriers on the way (i.e. it will walk through walls if necessary) To disable path planning for vehicles, apply this command to the driver.

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

Syntax

Syntax:
unit disableAI "skilltype"
Parameters:
unit: Object#Unit - AI unit
skilltype: String - AI skill to manipulate
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 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).

Bottom Section

Personal tools
Buy ArmA now!