combatBehaviour: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= ?\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 ")
Line 35: Line 35:
[[combatBehaviour]] group unit1; //"SAFE"</code>
[[combatBehaviour]] group unit1; //"SAFE"</code>


|seealso= [[setCombatBehaviour]] [[setBehaviour]] [[setBehaviourStrong]] [[setWaypointBehaviour]] [[combatMode]], [[setCombatMode]], [[skill]], [[setSkill]]
|seealso= [[setCombatBehaviour]] [[setBehaviour]] [[setBehaviourStrong]] [[setWaypointBehaviour]] [[combatMode]] [[setCombatMode]], [[skill]], [[setSkill]]
}}
}}

Revision as of 15:04, 20 January 2022

Hover & click on the images for description

Description

Description:
Returns combat behaviour of unit or group. To set unit or group behaviour see setCombatBehaviour. The behaviour is one of:
  • "CARELESS"
  • "SAFE"
  • "AWARE"
  • "COMBAT"
  • "STEALTH"
  • "ERROR" - when not available
Groups:
Object ManipulationGroups

Syntax

Syntax:
combatBehaviour unit
Parameters:
unit: Object - AI unit
Return Value:
String - unit behaviour, see description

Alternative Syntax

Syntax:
combatBehaviour group
Parameters:
group: Group - AI group
Return Value:
String - group behaviour, see description

Examples

Example 1:
unit1 setCombatBehaviour "CARELESS"; combatBehaviour unit1; //"CARELESS"
Example 2:
group unit1 setCombatBehaviour "SAFE"; combatBehaviour group unit1; //"SAFE"

Additional Information

See also:
setCombatBehaviour setBehaviour setBehaviourStrong setWaypointBehaviour combatMode setCombatModeskillsetSkill

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