combatMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "\|seealso= ?\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
Line 42: Line 42:
|x1= <code>[[if]] ([[combatMode]] _grp1 == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code>
|x1= <code>[[if]] ([[combatMode]] _grp1 == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code>


|seealso= [[Combat Modes]], [[setCombatMode]], [[behaviour]], [[setBehaviour]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]], [[setUnitCombatMode]], [[unitCombatMode]], [[setCombatBehaviour]], [[combatBehaviour]]
|seealso= [[Combat Modes]] [[setCombatMode]], [[behaviour]], [[setBehaviour]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]], [[setUnitCombatMode]], [[unitCombatMode]], [[setCombatBehaviour]], [[combatBehaviour]]
}}
}}



Revision as of 12:56, 20 January 2022

Hover & click on the images for description

Description

Description:
Returns the combat mode of the given AI group. See setCombatMode for more information about combat modes.
Groups:
Groups

Syntax

Syntax:
combatMode group
Parameters:
group: Group or Object - If the argument is unit Object, unit's current group is used.
Return Value:
String - one of:
  • "BLUE"
  • "GREEN"
  • "WHITE"
  • "YELLOW"
  • "RED"
  • "ERROR"

Examples

Example 1:
if (combatMode _grp1 == "BLUE") then {_grp1 setCombatMode "GREEN"};

Additional Information

See also:
Combat Modes setCombatModebehavioursetBehaviourskillsetSkillArma 3 AI SkillsetUnitCombatModeunitCombatModesetCombatBehaviourcombatBehaviour

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
Ceeeb
In OFP v1.96, combatMode return value does not change when unit's combat mode is set with radio commands, i.e troops under the player's command.