attackEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]OFP[ _]Elite(\|.*)?\]\]" to "{{GameCategory|ofpe|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma1 |Game name=
| arma1 |Game name=
Line 11: Line 10:


|gr2= Unit Control |GROUP2=
|gr2= Unit Control |GROUP2=
____________________________________________________________________________________________


| Return whether a group's leader can issue attack commands to soldiers under his command. |DESCRIPTION=
| Return whether a group's leader can issue attack commands to soldiers under his command. |DESCRIPTION=
____________________________________________________________________________________________


| [[Boolean]] <nowiki>=</nowiki> '''attackEnabled''' name |SYNTAX=
| [[Boolean]] <nowiki>=</nowiki> '''attackEnabled''' name |SYNTAX=
Line 21: Line 18:


| [[Boolean]] |RETURNVALUE=
| [[Boolean]] |RETURNVALUE=
____________________________________________________________________________________________
   
   
|x1= <code>if (not '''attackEnabled''' _soldier) then {_soldier [[setCombatMode]] "Careless"} </code> |EXAMPLE1=
|x1= <code>if (not '''attackEnabled''' _soldier) then {_soldier [[setCombatMode]] "Careless"} </code> |EXAMPLE1=
____________________________________________________________________________________________


| [[enableAttack]] |SEEALSO=
| [[enableAttack]] |SEEALSO=

Revision as of 01:30, 17 January 2021

Hover & click on the images for description

Description

Description:
Return whether a group's leader can issue attack commands to soldiers under his command.
Groups:
GroupsUnit Control

Syntax

Syntax:
Boolean = attackEnabled name
Parameters:
name: Object or Group
Return Value:
Boolean

Examples

Example 1:
if (not attackEnabled _soldier) then {_soldier setCombatMode "Careless"}

Additional Information

See also:
enableAttack

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

Notes

Bottom Section