Difference between revisions of "setFuel"

From Bohemia Interactive Community
Jump to navigation Jump to search
(Undo revision 104208 by Demellion (talk) Command has global effect when argument is local, exactly what is says on the tin)
m (Text replacement - " {2,}\}\}" to " }}")
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|= Comments
+
{{Command
____________________________________________________________________________________________
 
  
| ofp |= Game name
+
| ofp
  
|1.00|= Game version
+
|1.00
  
|arg= local |= Arguments in MP
+
|arg= local
  
|eff= global |= Effects in MP
+
|eff= global
____________________________________________________________________________________________
 
  
| Sets fuel percentage from 0 (empty) to 1 (full). The vehicle must be [[local]] to the computer where command is executed. |= Description
+
|gr1= Object Manipulation
____________________________________________________________________________________________
 
  
| vehicle '''setFuel''' amount |= Syntax
+
| Sets fuel percentage from 0 (empty) to 1 (full). The vehicle must be [[local]] to the computer where command is executed.
  
|p1= vehicle: [[Object]] |= Parameter 1
+
| vehicle '''setFuel''' amount
|p2= amount: [[Number]] |= Parameter 2
 
  
| [[Nothing]] |= Return value
+
|p1= vehicle: [[Object]]
____________________________________________________________________________________________
+
|p2= amount: [[Number]]
 +
 
 +
| [[Nothing]]
 
   
 
   
|x1= <code>_jeepOne [[setFuel]] 0.5;</code> |= Example 1
+
|x1= <code>_jeepOne [[setFuel]] 0.5;</code>
____________________________________________________________________________________________
 
 
 
| [[fuel]], [[getFuelCargo]], [[setFuelCargo]], [[setHit]], [[setAmmo]] |= See also
 
  
 +
| [[fuel]], [[getFuelCargo]], [[setFuelCargo]], [[setHit]], [[setAmmo]]
 
}}
 
}}
 
+
[[Category:Scripting Commands|SETFUEL]]
<h3 style="display:none">Notes</h3>
 
<dl class="command_description">
 
<!-- Note Section BEGIN -->
 
 
 
<!-- Note Section END -->
 
</dl>
 
 
 
<h3 style="display:none">Bottom Section</h3>[[Category:Scripting Commands|SETFUEL]]
 
 
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands OFP 1.96|SETFUEL]]
 
[[Category:Scripting Commands OFP 1.96|SETFUEL]]
 
[[Category:Scripting Commands OFP 1.46|SETFUEL]]
 
[[Category:Scripting Commands OFP 1.46|SETFUEL]]
[[Category:Scripting Commands ArmA|SETFUEL]]
+
{{GameCategory|arma1|Scripting Commands}}
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
+
{{GameCategory|arma2|Scripting Commands}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
+
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
+
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 00:40, 19 January 2021

Introduced with Operation Flashpoint version 1.001.00Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the network
Hover & click on the images for descriptions

Description

Description:
Sets fuel percentage from 0 (empty) to 1 (full). The vehicle must be local to the computer where command is executed.

Syntax

Syntax:
vehicle setFuel amount
Parameters:
vehicle: Object
amount: Number
Return Value:
Nothing

Examples

Example 1:
_jeepOne setFuel 0.5;

Additional Information

See also:
fuelgetFuelCargosetFuelCargosetHitsetAmmo
Groups:
Object Manipulation

Notes

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