attackEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("serv...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma1 |Game name=
| arma1


|1.00|Game version=
|1.00


|arg= global |Multiplayer Arguments=
|arg= global |Multiplayer Arguments=


|gr1= Groups |GROUP1=
|gr1= Groups


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


| 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.


| [[Boolean]] <nowiki>=</nowiki> '''attackEnabled''' name |SYNTAX=
| [[Boolean]] <nowiki>=</nowiki> '''attackEnabled''' name


|p1= name: [[Object]] or [[Group]] |PARAMETER1=
|p1= name: [[Object]] or [[Group]]


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


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


}}
}}

Revision as of 01:01, 18 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