disableAI: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
back to [[Scripting_Reference#D|COMREF]]
<h2 style="color:#000066">''unit '''''disableAI ''section'''''</h2>
<h2 style="color:#000066">''unit '''''disableAI ''section'''''</h2>


'''Operand types:'''
'''Operand types:'''


unit: [[Object]]
'''unit:''' [[Object]]


section: [[String]]
'''section:''' [[String]]


'''Type of returned value:'''
'''Type of returned value:'''


Nothing
[[Nothing]]


'''Description:'''
'''Description:'''
Line 15: Line 18:
Disable parts of AI behaviour to get fine control over unit.
Disable parts of AI behaviour to get fine control over unit.


Section is one of:
'''Section''' is one of:
 
* '''"TARGET"''' (disable watching assigned target)
 
* '''"AUTOTARGET"''' (disable independed target assigning and watching unknown targets),
 
* '''"MOVE"''' (disable movement)


    * "TARGET" (disable watching assigned target)
    * "AUTOTARGET" (disable independed target assigning and watching unknown targets),
    * "MOVE" (disable movement)


'''Example:'''
'''Example:'''


soldierOne '''disableAI''' "Move"
soldierOne '''disableAI''' "Move"


'''Comments'''
'''Comments'''


The "TARGET" section of the AI is likely different than what you would think.
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.
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.
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.
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 way, you can have them stay behind their cover, and not run out into the open.

Revision as of 11:03, 16 April 2006

back to COMREF

unit disableAI section


Operand types:

unit: Object

section: String

Type of returned value:

Nothing

Description:

Disable parts of AI behaviour to get fine control over unit.

Section is one of:

  • "TARGET" (disable watching assigned target)
  • "AUTOTARGET" (disable independed target assigning and watching unknown targets),
  • "MOVE" (disable movement)


Example:

soldierOne disableAI "Move"


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.