combatMode: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
(fixed description)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns the combat mode of the given unit. 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=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[String]] <nowiki>=</nowiki> '''combatMode''' grp|SYNTAX=
| [[combatMode]] group|SYNTAX=


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


| [[String]] -   
| [[String]] -   
Line 20: Line 20:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[if]] (([[combatMode]] _grp1) == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code> |EXAMPLE1=
|x1= <code>[[if]] ([[combatMode]] _grp1 == "BLUE") [[then]] {_grp1 [[setCombatMode]] "GREEN"};</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 15:30, 24 November 2019

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:
Uncategorised

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 Skill

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