setCombatMode: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|seealso= ([^ ]+)\]\], *\[\[" to "|seealso= $1]] [[") |
Lou Montana (talk | contribs) m (Text replacement - "[[Arma 3 " to "[[Arma 3: ") |
||
(7 intermediate revisions by the same user not shown) | |||
Line 39: | Line 39: | ||
|s1= group [[setCombatMode]] mode | |s1= group [[setCombatMode]] mode | ||
|p1= group: [[Group]] or [[Object]] - | |p1= group: [[Group]] or [[Object]] - if the argument is unit [[Object]], unit's current group is used. | ||
|p2= mode: [[String]] - | |p2= mode: [[String]] - see description | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
Line 47: | Line 47: | ||
|x1= <sqf>_group1 setCombatMode "BLUE";</sqf> | |x1= <sqf>_group1 setCombatMode "BLUE";</sqf> | ||
|seealso= | |seealso= [[Combat Modes]] [[Mission_Editor:_Waypoints#Combat_Mode|Use in Waypoints]] [[combatMode]] [[behaviour]] [[setBehaviour]] [[skill]] [[setSkill]] [[Arma 3: AI Skill]] [[setUnitCombatMode]] [[unitCombatMode]] [[setCombatBehaviour]] [[combatBehaviour]] | ||
}} | }} | ||
{{Note | |||
|user= .kju | |||
|timestamp= 20200101073500 | |||
|text= | |||
* Combat mode can only be changed via scripting/waypoints - not by player radio commands for an AI group. | * Combat mode can only be changed via scripting/waypoints - not by player radio commands for an AI group. | ||
<br> | <br> | ||
Line 63: | Line 60: | ||
<br> | <br> | ||
* "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. | * "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. | * 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. | * "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. | ||
<br> | <br> | ||
* Applying combat mode blue, clears the attack target commands from AI subgroups. Might be useful in combination with [[doFollow]]/[[commandFollow]]. Note: It will not | * Applying combat mode blue, clears the attack target commands from AI subgroups. Might be useful in combination with [[doFollow]]/[[commandFollow]]. Note: It will not affect [[assignedTarget]]s. | ||
}} | |||
Latest revision as of 10:38, 6 May 2024
Description
- Description:
- Sets AI group combat mode (engagement rules). For individual unit's combat mode see setUnitCombatMode. 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
- Groups:
- GroupsAI Behaviour
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 Modes Use in Waypoints combatMode behaviour setBehaviour skill setSkill Arma 3: AI Skill setUnitCombatMode unitCombatMode setCombatBehaviour combatBehaviour
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
- Posted on Jan 01, 2020 - 07:35 (UTC)
-
- 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 affect assignedTargets.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Groups
- Command Group: AI Behaviour
- Scripting Commands: Global Effect