setCombatBehaviour: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ")
No edit summary
(One intermediate revision by one other user not shown)
Line 11: Line 11:
|gr2= Groups
|gr2= Groups


|descr= Sets unit behaviour (main syntax) or group behaviour (alternative syntax). To retrieve unit or group behaviour see [[combatBehaviour]]. The behaviour is one of:  
|descr= Sets an individual unit behaviour (main syntax) or a whole group behaviour (alternative syntax). To retrieve unit or group behaviour see [[combatBehaviour]]. The behaviour is one of:  
* "CARELESS"
* "CARELESS"
* "SAFE"
* "SAFE"
Line 34: Line 34:


|r2= [[Nothing]]
|r2= [[Nothing]]
 
 
|x1= <code>unit1 [[setCombatBehaviour]] "SAFE";</code>
|x1= <code>unit1 [[setCombatBehaviour]] "SAFE";</code>



Revision as of 10:29, 22 October 2021

Hover & click on the images for description

Description

Description:
Sets an individual unit behaviour (main syntax) or a whole group behaviour (alternative syntax). To retrieve unit or group behaviour see combatBehaviour. The behaviour is one of:
  • "CARELESS"
  • "SAFE"
  • "AWARE"
  • "COMBAT"
  • "STEALTH"
See AI Behaviour for details of the effect of this command on AI units. Group behaviour usually is "CARELESS" or "SAFE"
Groups:
Object ManipulationGroups

Syntax

Syntax:
unit setCombatBehaviour behaviour
Parameters:
unit: Object - AI unit
behaviour: String - see description
Return Value:
Nothing

Alternative Syntax

Syntax:
group setCombatBehaviour behaviour
Parameters:
group: Group - AI group
behaviour: String - see description
Return Value:
Nothing

Examples

Example 1:
unit1 setCombatBehaviour "SAFE";
Example 2:
group1 setCombatBehaviour "CARELESS";

Additional Information

See also:
AIBehaviourcombatBehaviourbehavioursetBehavioursetBehaviourStrongsetWaypointBehaviourcombatModesetCombatModeskillsetSkill

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