attackEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (=)
m (changed global to local variable to make clear the variable)
Line 12: Line 12:
| [[Boolean]] <nowiki>=</nowiki> '''attackEnabled''' UnitOrGroup |= Syntax
| [[Boolean]] <nowiki>=</nowiki> '''attackEnabled''' UnitOrGroup |= Syntax


|p1= UnitOrGroup : [[Object]] or [[Group]] |= Parameter 1
|p1= UnitOrGroup : [[Object#Unit|Unit]] or [[Group]] |= Parameter 1


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



Revision as of 06:01, 27 August 2007

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Return whether leader can issue attack commands.
Groups:
Uncategorised

Syntax

Syntax:
Boolean = attackEnabled UnitOrGroup
Parameters:
UnitOrGroup : Unit or Group
Return Value:
Boolean

Examples

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

Additional Information

See also:
See also needed

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