Description
Sets an individual unit entity behaviour (main syntax) or a group entity behaviour (alternative syntax). The group in this case is a Group entity and not a simple collection of units. To retrieve unit or group behaviour see combatBehaviour. The behaviour is one of:
- "CARELESS"
- "SAFE"
- "AWARE"
- "COMBAT"
- "STEALTH"
Note
See AI Behaviour for details of the effect of this command on AI units. Group behaviour usually is "CARELESS" or "SAFE"
| Command | Applies To |
|---|---|
| setBehaviour | Every unit in the group, but not the group itself |
| setBehaviourStrong | Every unit in the group, and the group itself |
| setCombatBehaviour | If argument is Object, only that unit, and if argument is Group, the group itself (not its units) |
Syntax
Syntax 1
unit setCombatBehaviour behaviour
Parameters:
Returns: Nothing
Syntax 2
group setCombatBehaviour behaviour
Parameters:
Returns: Nothing
Examples
Example 1
unit1 setCombatBehaviour "SAFE";
Example 2
group1 setCombatBehaviour "CARELESS";
See also
AIBehaviour · combatBehaviour · behaviour · setBehaviour · setBehaviourStrong · setWaypointBehaviour · combatMode · setCombatMode · skill · setSkill