behaviour: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
(39 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| ofp |Game name=
|game1= ofp
|version1= 1.00


|1.00|Game version=
|game2= ofpe
|version2= 1.00


|arg= global |Multiplayer Arguments=
|game3= arma1
|version3= 1.00


|eff= |Multiplayer Effects=
|game4= arma2
|version4= 1.00


|gr1= Object Manipulation |GROUP1=
|game5= arma2oa
____________________________________________________________________________________________
|version5= 1.50


| Returns the behaviour of the unit's [[group]]. For Arma 3 behaviour explanation see [[Arma_3_AI_Behavior]] |DESCRIPTION=
|game6= tkoh
____________________________________________________________________________________________
|version6= 1.00


| '''behaviour''' unitName |SYNTAX=
|game7= arma3
|version7= 0.50


|p1= unitName: [[Object]] |PARAMETER1=
|arg= global


| [[String]] - 
|gr1= AI Behaviour
One of:
*"CARELESS"
*"SAFE"
*"AWARE"
*"COMBAT"
*"STEALTH"
*"ERROR" (Since {{GVI|Arma3|1.78}} when used on empty vehicles and such) |RETURNVALUE=
____________________________________________________________________________________________
 
|x1= <code>_soldier [[setBehaviour]] "CARELESS";
_b = [[behaviour]] _soldier; //returns "CARELESS"</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[Mission_Editor:_Waypoints#Behaviour|behaviour description]], [[AIBehaviour]], [[setBehaviour]], [[setWaypointBehaviour]], [[combatMode]], [[setCombatMode]], [[skill]], [[setSkill]], [[Arma 3 AI Skill]] |SEEALSO=
|descr= Returns the behaviour of the individual unit, this is why it only accepts [[Object]] as the argument. For Arma 3 behaviour explanation see [[Arma_3_AI_Behavior]]


}}
|s1= [[behaviour]] unit
 
|p1= unit: [[Object]]


<!-- Note Section END -->
|r1= [[String]] - one of:
</dl>
* "CARELESS"
* "SAFE"
* "AWARE"
* "COMBAT"
* "STEALTH"
* "ERROR" (Since {{GVI|Arma3|1.78}} when used on empty vehicles and such)


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>_soldier setBehaviour "CARELESS";
_b = behaviour _soldier; // returns "CARELESS"</sqf>


[[Category:Scripting Commands|BEHAVIOUR]]
|seealso= [[AIBehaviour]] [[setBehaviour]] [[setWaypointBehaviour]] [[combatMode]] [[setCombatMode]] [[skill]] [[setSkill]] [[Arma 3 AI Skill]] [[setCombatBehaviour]] [[combatBehaviour]]
[[Category:Scripting Commands OFP 1.99|BEHAVIOUR]]
}}
[[Category:Scripting Commands OFP 1.96|BEHAVIOUR]]
[[Category:Scripting Commands OFP 1.46|BEHAVIOUR]]
[[Category:Scripting Commands Armed Assault|BEHAVIOUR]]
[[Category:Scripting Commands Arma 2|BEHAVIOUR]]
[[Category:Command_Group: Object Manipulation|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Unit_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Revision as of 10:21, 13 May 2022

Hover & click on the images for description

Description

Description:
Returns the behaviour of the individual unit, this is why it only accepts Object as the argument. For Arma 3 behaviour explanation see Arma_3_AI_Behavior
Groups:
AI Behaviour

Syntax

Syntax:
behaviour unit
Parameters:
unit: Object
Return Value:
String - one of:
  • "CARELESS"
  • "SAFE"
  • "AWARE"
  • "COMBAT"
  • "STEALTH"
  • "ERROR" (Since Arma 3 logo black.png1.78 when used on empty vehicles and such)

Examples

Example 1:
_soldier setBehaviour "CARELESS"; _b = behaviour _soldier; // returns "CARELESS"

Additional Information

See also:
AIBehaviour setBehaviour setWaypointBehaviour combatMode setCombatMode skill setSkill Arma 3 AI Skill setCombatBehaviour combatBehaviour

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