Disables parts of the AI behavior, to get a better control over the actions of a unit.
Possible values are:
|Syntax:||unit disableAI skilltype|
_soldier1 disableAI "AUTOTARGET"
|See also:||enableAI, isEnabledAI|
|Problems:||In V3.x, AI drivers may not follow waypoints accurately, even if "PATHPLAN" and "COLLISIONAVOID" are disabled.|
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.
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).