combatMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
mNo edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 25: Line 25:


|gr1= Groups
|gr1= Groups
|gr2= AI Behaviour


|descr= Returns the combat mode of the given AI [[Group | group]]. See [[setCombatMode]] for more information about combat modes.
|descr= Returns the combat mode of the given AI [[Group | group]]. See [[setCombatMode]] for more information about combat modes.
Line 30: Line 32:
|s1= [[combatMode]] group
|s1= [[combatMode]] group


|p1= group: [[Group]] or [[Object]] - If the argument is unit [[Object]], unit's current group is used.
|p1= group: One of
* [[Group]]
* [[Object]] of type [[Object|Unit]] - if the argument is unit [[Object]], unit's current group is used.


|r1= [[String]] - one of:
|r1= [[String]] - one of:
Line 40: Line 44:
* "ERROR"
* "ERROR"


|x1= <code>[[if]] ([[combatMode]] _grp1 == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code>
|x1= <sqf>if (combatMode _grp1 == "BLUE") then {_grp1 setCombatMode "GREEN"};</sqf>


|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]]
}}
}}



Latest revision as of 09:46, 16 June 2024

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:
GroupsAI Behaviour

Syntax

Syntax:
combatMode group
Parameters:
group: One of
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 setCombatMode 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
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.