attackEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(59 intermediate revisions by 10 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


| Return whether leader can issue attack commands. |= Description
|game3= arma2
____________________________________________________________________________________________
|version3= 1.00


| '''attackEnabled''' group |= Syntax
|game4= arma2oa
|version4= 1.50


|p1= group: [[Object]] or [[Group]] |= Parameter 1
|game5= tkoh
|version5= 1.00


| [[Boolean]] |= Return value
|game6= arma3
____________________________________________________________________________________________
|version6= 0.50
 
|x1= <code>if (not '''attackEnabled''' soldier) then {soldier [[setCombatMode]] "Careless"} </code> |= Example 1
____________________________________________________________________________________________


| |= See also
|arg= global


}}
|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}}}}]]

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