Difference between revisions of "fuel"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
Line 1: Line 1:
[[Category:Scripting Commands|FUEL]]
+
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|FUEL]]
+
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|FUEL]]
 
[[Category:Scripting Commands ArmA|FUEL]]
 
  
 +
| ofp |= Game name
  
<h2 style="color:#000066">'''fuel ''vehicle'''''</h2>
+
|1.00|= Game version
  
 +
|arg= global |= Arguments in MP
 +
____________________________________________________________________________________________
  
'''Operand types:'''
+
| Checks how much fuel is left in the gas tank of a vehicle. |= Description
 +
____________________________________________________________________________________________
  
'''vehicle:''' [[Object]]
+
| '''fuel''' vehicle |= Syntax
  
'''Type of returned value:'''
+
|p1= vehicle: [[Object]] |= Parameter 1
  
[[Number]]
+
| [[Number]]
 +
The returned number is in range 0 (empty tank) to 1 (full tank). |= Return value
 +
____________________________________________________________________________________________
 +
 
 +
|x1= <pre>? (fuel (vehicle player) == 0) : hint "The vehicle is out of fuel!"</pre> |= Example 1
 +
____________________________________________________________________________________________
  
'''Description:'''
+
| [[setFuel]] |= See also
  
Check how much '''fuel''' the '''vehicle''' has left in the gas tank, in range 0 to 1.
+
}}
  
 +
<h3 style="display:none">Notes</h3>
 +
<dl class="command_description">
 +
<!-- Note Section BEGIN -->
  
'''Example:'''
+
<!-- Note Section END -->
 +
</dl>
  
? ('''fuel''' ([[vehicle]] [[player]]) <25) : [[hint]] "Fuel is running low"
+
<h3 style="display:none">Bottom Section</h3>
 +
[[Category:Scripting Commands|FUEL]]
 +
[[Category:Scripting Commands OFP 1.96|FUEL]]
 +
[[Category:Scripting Commands OFP 1.46|FUEL]]
 +
[[Category:Scripting Commands ArmA|FUEL]]

Revision as of 01:19, 2 August 2006

Introduced with Operation Flashpoint version 1.001.00Arguments of this scripting command don't have to be local to the client the command is executed on
Hover & click on the images for descriptions

Description

Description:
Checks how much fuel is left in the gas tank of a vehicle.

Syntax

Syntax:
fuel vehicle
Parameters:
vehicle: Object
Return Value:
Number - The returned number is in range 0 (empty tank) to 1 (full tank).

Examples

Example 1:
? (fuel (vehicle player) == 0) : hint "The vehicle is out of fuel!"

Additional Information

See also:
setFuel

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

Notes

Bottom Section