combatBehaviour: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (command group)
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 11: Line 11:


|descr= Returns combat behaviour of unit or group. To set unit or group behaviour see [[setCombatBehaviour]]. The behaviour is one of:
|descr= Returns combat behaviour of unit or group. To set unit or group behaviour see [[setCombatBehaviour]]. The behaviour is one of:
|s1= [[combatBehaviour]] unitOrGroup
|p1= unitOrGroup: [[Object]] or [[Group]] - AI unit or group
|r1= [[String]] - unit behaviour - one of:
{{Columns|2|
* "CARELESS"
* "CARELESS"
* "SAFE"
* "SAFE"
Line 17: Line 25:
* "STEALTH"
* "STEALTH"
* "ERROR" - when not available
* "ERROR" - when not available
}}


|s1= [[combatBehaviour]] unit
|x1= <sqf>
 
unit1 setCombatBehaviour "CARELESS";
|p1= unit: [[Object]] - AI unit
combatBehaviour unit1; // "CARELESS"
 
</sqf>
|r1= [[String]] - unit behaviour, see description
 
|s2= [[combatBehaviour]] group
 
|p21= group: [[Group]] - AI group
 
|r2= [[String]] - group behaviour, see description 
 
|x1= <code>unit1 [[setCombatBehaviour]] "CARELESS";
[[combatBehaviour]] unit1; //"CARELESS"</code>


|x2= <code>group unit1 [[setCombatBehaviour]] "SAFE";
|x2= <sqf>
[[combatBehaviour]] group unit1; //"SAFE"</code>
group unit1 setCombatBehaviour "SAFE";
combatBehaviour group unit1; // "SAFE"
</sqf>


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

Latest revision as of 06:09, 27 November 2023

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:
Groups:
AI BehaviourGroups

Syntax

Syntax:
combatBehaviour unitOrGroup
Parameters:
unitOrGroup: Object or Group - AI unit or group
Return Value:
String - unit behaviour - one of:
  • "CARELESS"
  • "SAFE"
  • "AWARE"
  • "COMBAT"
  • "STEALTH"
  • "ERROR" - when not available

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 setCombatMode skill setSkill

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