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:
Notes:
|
Syntax | |
Syntax: | unit disableAI skilltype |
Parameters: | |
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).