disableAI (VBS2)
From Bohemia Interactive Community
| Editors, please check Policy: Scripting Command Page Syntax. |
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
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).

