disableAI: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (+ Note about bug)
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|DISABLEAI]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|DISABLEAI]]
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|DISABLEAI]]
[[Category:Scripting Commands ArmA|DISABLEAI]]


| ofp |= Game name


<h2 style="color:#000066">'''''unit'' disableAI ''section'''''</h2>
|1.00|= Game version


|arg= local |= Arguments in MP


'''Operand types:'''
|eff= local |= Effects in MP
____________________________________________________________________________________________


'''unit:''' [[Object]]
| Disable parts of the AI behaviour to get a better control over the actions of a unit. Note that this command can't be undone!Using the section "TARGET" will stop the unit to watch the assigned target, "AUTOTARGET" will prevent the unit from assigning a target independently and watching unknown objects, "MOVE" will disable the AI's movement. |= Description
____________________________________________________________________________________________


'''section:''' [[String]]
| unit '''disableAI''' section |= Syntax


'''Type of returned value:'''
|p1= unit: [[Object]] - AI unit |= Parameter 1


[[Nothing]]
|p2= section: [[String]] - one of "TARGET", "AUTOTARGET" and "MOVE" (see above) |= Parameter 2


'''Description:'''
| [[Nothing]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>soldier1 disableAI "AUTOTARGET"</pre> |= Example 1
____________________________________________________________________________________________


Disable parts of AI behaviour to get fine control over unit.
|  |= See also


'''Section''' is one of:
}}


* '''"TARGET"''' (disable watching assigned target)
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


* '''"AUTOTARGET"''' (disable independed target assigning and watching unknown targets),
<!-- Note Section END -->
</dl>


* '''"MOVE"''' (disable movement)
<h3 style="display:none">Bottom Section</h3>
Old Notes (temporary):


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


'''Example:'''
[[Category:Scripting Commands|DISABLEAI]]
 
[[Category:Scripting Commands OFP 1.96|DISABLEAI]]
soldierOne '''disableAI''' '''"Move"'''
[[Category:Scripting Commands OFP 1.46|DISABLEAI]]
 
[[Category:Scripting Commands ArmA|DISABLEAI]]
 
'''Comments:'''
 
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).

Revision as of 00:46, 2 August 2006

Hover & click on the images for description

Description

Description:
Disable parts of the AI behaviour to get a better control over the actions of a unit. Note that this command can't be undone!Using the section "TARGET" will stop the unit to watch the assigned target, "AUTOTARGET" will prevent the unit from assigning a target independently and watching unknown objects, "MOVE" will disable the AI's movement.
Groups:
Uncategorised

Syntax

Syntax:
unit disableAI section
Parameters:
unit: Object - AI unit
section: String - one of "TARGET", "AUTOTARGET" and "MOVE" (see above)
Return Value:
Nothing

Examples

Example 1:
soldier1 disableAI "AUTOTARGET"

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section

Old Notes (temporary):

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