canFire: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(templated old notes; added example; simplified boolean description. main description untouched)
Line 17: Line 17:


| [[Boolean]] -   
| [[Boolean]] -   
true if it's still able to fire, false if not |= Return value
true if able to fire |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>?!(canFire _tank) : player sideChat "Tank disabled!"</pre> |= Example 1
|x1= <code>?!([[canFire]] _tank) : [[player]] [[sideChat]] "Tank disabled!"</code> |= Example 1
 
|x2= <code>[[if]] ([[!]]([[canFire]] _tank)) [[then]] {
[[player]] [[sideChat]] "Tank disabled!";
};</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 30: Line 34:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 07:16, 20 January 2007 (CEST)
<dt class="note">'''[[User:Bdfy|Bdfy]]'''
<dd class="note">
true even if unit is out of ammo. Only false if gun is damaged.  
true even if unit is out of ammo. Only false if gun is damaged.  
<!-- Note Section END --><br>
 
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 05:20, 24 August 2008 (CEST)
False if there is no gunner in the vehicle, regardless of damage level. --[[User:Canukausiuka|Canukausiuka]] 05:20, 24 August 2008 (CEST)
<dt class="note">'''[[User:Canukausiuka|Canukausiuka]]'''
<dd class="note">
False if there is no gunner in the vehicle, regardless of damage level.
<!-- Note Section END --></dl>
<!-- Note Section END --></dl>



Revision as of 01:26, 31 December 2014

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 unitName
Parameters:
unitName: Object
Return Value:
Boolean - true if able to fire

Examples

Example 1:
?!(canFire _tank) : player sideChat "Tank disabled!"
Example 2:
if (!(canFire _tank)) then { 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

Posted on 07:16, 20 January 2007 (CEST)
Bdfy
true even if unit is out of ammo. Only false if gun is damaged.
Posted on 05:20, 24 August 2008 (CEST)
Canukausiuka
False if there is no gunner in the vehicle, regardless of damage level.

Bottom Section