Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.35

Description

Description:

Sets the unit combat mode (engagement rules).

Note: Does not work for groups.

Syntax

Syntax:unit setUnitCombatMode mode
Parameters:
  • unit: Object - Unit to which combat mode is applied.
  • mode: String - Combat mode applied to the unit. Can be:
    • "BLUE" (Never fire)
    • "GREEN" (Hold fire - defend only)
    • "WHITE" (Hold fire, engage at will)
    • "YELLOW" (Open fire)
    • "RED" (Open fire, engage at will)
Return Value:Boolean - Returns true, if the combat mode is applied successfully; otherwise, false.

Examples

Examples:
_sucess = _unit1 setUnitCombatMode "BLUE";

Additional Information

See also: unitCombatMode, setUnitBehaviour
Multiplayer:
Problems:

Notes