canFire: 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> '''canFire''' vehicle |= Syntax
| _[[Boolean]] <nowiki>=</nowiki> '''canFire''' [[Object|#Unit|Unit]]|= Syntax


|p1= vehicle: [[Object]] |= Parameter 1
|p1= [[Object|#Unit|Unit]]: [[Object]] |= Parameter 1


| [[Boolean]] -   
| [[Boolean]] -   
Line 20: Line 20:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>?!(canFire tank) : player sideChat "Tank disabled!"</pre> |= Example 1
|x1= <pre>?!(canFire _tank) : player sideChat "Tank disabled!"</pre> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 06:39, 27 August 2007

Hover & click on the images for description

Description

Description:
Returns if the given vehicle is still able to fire. This command checks only the damage value, not the ammo!
Groups:
Uncategorised

Syntax

Syntax:
_Boolean = canFire #Unit|Unit
Parameters:
#Unit|Unit: Object
Return Value:
Boolean - true if it's still able to fire, false if not

Examples

Example 1:
?!(canFire _tank) : player sideChat "Tank disabled!"

Additional Information

See also:
canMovecanStand

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

true even if unit is out of ammo. Only false if gun is damaged.

Bottom Section