setCombatMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofp |Game name=
| ofp
|1.00|Game version=
|1.00
|arg= local|Multiplayer Arguments=
|arg= local
|eff= global|Multiplayer Effects=
|eff= global


|gr1= Groups |GROUP1=
|gr1= Groups


| Sets AI [[Group | group]] combat mode (engagement rules). Mode may be one of the following:  
| Sets AI [[Group | group]] combat mode (engagement rules). Mode may be one of the following:  
Line 15: Line 15:
* <tt>"RED"</tt> : Fire at will, engage at will/loose formation
* <tt>"RED"</tt> : Fire at will, engage at will/loose formation
See [[Combat Modes]] for more information on combat modes.
See [[Combat Modes]] for more information on combat modes.
|DESCRIPTION=


| group [[setCombatMode]] mode |SYNTAX=


|p1= group: [[Group]] or [[Object]]. If the argument is unit [[Object]], unit's current group is used. |PARAMETER1=
| group [[setCombatMode]] mode


|p2= mode: [[String]] - See description|PARAMETER2=
|p1= group: [[Group]] or [[Object]]. If the argument is unit [[Object]], unit's current group is used.


| [[Nothing]] |RETURNVALUE=
|p2= mode: [[String]] - See description
 
| [[Nothing]]
   
   
|x1= <code>_group1 [[setCombatMode]] "BLUE";</code> |EXAMPLE1=
|x1= <code>_group1 [[setCombatMode]] "BLUE";</code>


| [[Combat Modes]], [[Mission_Editor:_Waypoints#Combat_Mode|Use in Waypoints]], [[combatMode]], [[behaviour]], [[setBehaviour]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]], [[setUnitCombatMode]], [[unitCombatMode]] |SEEALSO=
| [[Combat Modes]], [[Mission_Editor:_Waypoints#Combat_Mode|Use in Waypoints]], [[combatMode]], [[behaviour]], [[setBehaviour]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]], [[setUnitCombatMode]], [[unitCombatMode]]


}}
}}

Revision as of 12:11, 18 January 2021

Hover & click on the images for description

Description

Description:
Sets AI group combat mode (engagement rules). Mode may be one of the following:
  • "BLUE" : Never fire, keep formation
  • "GREEN" : Hold fire, keep formation
  • "WHITE" : Hold fire, engage at will/loose formation
  • "YELLOW" : Fire at will, keep formation
  • "RED" : Fire at will, engage at will/loose formation
See Combat Modes for more information on combat modes.
Groups:
Groups

Syntax

Syntax:
group setCombatMode mode
Parameters:
group: Group or Object. If the argument is unit Object, unit's current group is used.
mode: String - See description
Return Value:
Nothing

Examples

Example 1:
_group1 setCombatMode "BLUE";

Additional Information

See also:
Combat ModesUse in WaypointscombatModebehavioursetBehaviourskillsetSkillArma 3 AI SkillsetUnitCombatModeunitCombatMode

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

Posted on January 1, 2020 - 07:35 (UTC)
.kju
  • Combat mode can only be changed via scripting/waypoints - not by player radio commands for an AI group.

  • "Engage at will" means AI can form subgroups and break off to engage known or assigned enemies. These AI will then act largely on their own.
  • As player one can use the "engage at will" radio command to achieve the same/similar behavior. However this will not change the unit's combat mode. Yet one can override the "keep/loose formation" status of combat mode with radio commands.

  • "Never fire" means AI will actually never fire. Whereas under "Hold fire", AI will shoot back if getting fired upon, hostiles get too close, or they get a target explicitly assigned by the (sub)group leader.
  • As player one can override the fire status with radio commands ("Hold fire", "Open fire", "Fire"). However this will not change the unit's combat mode.
  • "Never fire"/combat mode blue cannot be overridden by group leader target assignment. One needs to command "Open fire" or switch to a different combat mode (with "Hold fire") to be able to do so.

  • Applying combat mode blue, clears the attack target commands from AI subgroups. Might be useful in combination with doFollow/commandFollow. Note: It will not effect assignedTargets.