combatMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]2(\|.*)]]" to "{{GameCategory|arma2|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| ofp |Game name=
| ofp |Game name=
Line 9: Line 8:


|gr1= Groups |GROUP1=
|gr1= Groups |GROUP1=
____________________________________________________________________________________________


| Returns the combat mode of the given AI [[Group | group]]. See [[setCombatMode]] for more information about combat modes. |DESCRIPTION=
| Returns the combat mode of the given AI [[Group | group]]. See [[setCombatMode]] for more information about combat modes. |DESCRIPTION=
____________________________________________________________________________________________


| [[combatMode]] group|SYNTAX=
| [[combatMode]] group|SYNTAX=
Line 20: Line 17:
| [[String]] -   
| [[String]] -   
One of "BLUE", "GREEN", "WHITE", "YELLOW" and "RED" or "ERROR" |RETURNVALUE=
One of "BLUE", "GREEN", "WHITE", "YELLOW" and "RED" or "ERROR" |RETURNVALUE=
____________________________________________________________________________________________
   
   
|x1= <code>[[if]] ([[combatMode]] _grp1 == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code> |EXAMPLE1=
|x1= <code>[[if]] ([[combatMode]] _grp1 == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[Combat Modes]], [[setCombatMode]], [[behaviour]], [[setBehaviour]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]], [[setUnitCombatMode]], [[unitCombatMode]] |SEEALSO=
| [[Combat Modes]], [[setCombatMode]], [[behaviour]], [[setBehaviour]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]], [[setUnitCombatMode]], [[unitCombatMode]] |SEEALSO=

Revision as of 01:21, 17 January 2021

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" and "RED" or "ERROR"

Examples

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

Additional Information

See also:
Combat ModessetCombatModebehavioursetBehaviourskillsetSkillArma 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 August 3, 2006 - 14:25
hardrock
Notes from before the conversion: Use setCombatMode to set the combat mode. The definitions of the colours are given under that command.
Ceeeb
In OFP v1.96, combatMode return value does not change when unit's combat mode is set with radio commands, ie troops under the player's command.

Bottom Section