combatBehaviour: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
mNo edit summary
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


|Arma3dev
|game1= arma3
 
|version1= 2.04
|2.03


|arg= global
|arg= global


|eff=
|gr1= AI Behaviour


|gr1= Object Manipulation
|gr2= Groups
|gr2= Groups


| 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:
*"CARELESS"
*"SAFE"
*"AWARE"
*"COMBAT"
*"STEALTH"
*"ERROR" - when not available


|  [[combatBehaviour]] unit


|p1= unit: [[Object]] - AI unit
|s1= [[combatBehaviour]] unitOrGroup


| [[String]] - unit behaviour, see description
|p1= unitOrGroup: [[Object]] or [[Group]] - AI unit or group


|s2= [[combatBehaviour]] group
|r1= [[String]] - unit behaviour - one of:
{{Columns|2|
* "CARELESS"
* "SAFE"
* "AWARE"
* "COMBAT"
* "STEALTH"
* "ERROR" - when not available
}}


|p21= group: [[Group]] - AI group
|x1= <sqf>
unit1 setCombatBehaviour "CARELESS";
combatBehaviour unit1; // "CARELESS"
</sqf>


|r2= [[String]] - group behaviour, see description 
|x2= <sqf>
 
group unit1 setCombatBehaviour "SAFE";
|x1= <code>unit1 [[setCombatBehaviour]] "CARELESS";
combatBehaviour group unit1; // "SAFE"
[[combatBehaviour]] unit1; //"CARELESS"</code>
</sqf>


|x2= <code>group unit1 [[setCombatBehaviour]] "SAFE";
|seealso= [[setCombatBehaviour]] [[setBehaviour]] [[setBehaviourStrong]] [[setWaypointBehaviour]] [[combatMode]] [[setCombatMode]] [[skill]] [[setSkill]]
[[combatBehaviour]] group unit1; //"SAFE"</code>
 
|seealso= [[setCombatBehaviour]], [[setBehaviour]], [[setBehaviourStrong]], [[setWaypointBehaviour]], [[combatMode]], [[setCombatMode]], [[skill]], [[setSkill]]
}}
}}
<!-- Note Section END -->
</dl>
{{GameCategory|arma3|Scripting Commands}}

Latest revision as of 07: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