attackEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
 
(48 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= ofpe
|version1= 1.00


|1.00|= Game version
|game2= arma1
|version2= 1.00


|arg= global |= Arguments in MP
|game3= arma2
____________________________________________________________________________________________
|version3= 1.00


| Return whether a group's leader can issue attack commands to soldiers under his command. |= Description
|game4= arma2oa
____________________________________________________________________________________________
|version4= 1.50


| [[Boolean]] <nowiki>=</nowiki> '''attackEnabled''' name |= Syntax
|game5= tkoh
|version5= 1.00


|p1= name: [[Object]] or [[Group]] |= Parameter 1
|game6= arma3
|version6= 0.50


| [[Boolean]] |= Return value
|arg= global
____________________________________________________________________________________________
 
|x1= <code>if (not '''attackEnabled''' _soldier) then {_soldier [[setCombatMode]] "Careless"} </code> |= Example 1
____________________________________________________________________________________________


| [[enableAttack]] |= See also
|gr1= Groups


}}
|gr2= Unit Control
 
|descr= Return whether a group's leader can issue attack commands to soldiers under his command.


<h3 style="display:none">Notes</h3>
|s1= [[attackEnabled]] name
<dl class="command_description">


<!-- Note Section BEGIN -->
|p1= name: [[Object]] or [[Group]]


<!-- Note Section END -->
|r1= [[Boolean]]
</dl>


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>if (not attackEnabled _soldier) then { _soldier setCombatMode "Careless" };</sqf>


[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
|seealso= [[enableAttack]]
[[Category:Scripting Commands OFP Elite|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:07, 13 May 2022

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