Author: Wyqer
Author Website:

Requirements: No addons required

Version: 2017-02-08

Short description: This script handles the fuel consumption of vehicles, so that refueling will be necessary more often.

Date: 2017-03-04 13:01

Comments: (0)


KP Fuel Consumption Script


This little script for the mission file let you decide how long vehicles will be able to drive with one full fuel tank and how long a vehicle can let his engine on while standing till one fuel tank is depleted.

You can download the rar file, extract it and put the scripts folder in your missionfile.
If you don't have a init.sqf, just put the one provided in. If you already have a init.sqf, then copy the content from the provided one to yours.

You can adjust the values at the parameter list of the execVM.
third parameter (60 in the provided example) is the time in minutes while driving and fourth parameter (180 in the provided example) is the time in minutes while only leaving the engine on.

The script adjust the depletion every second on the machine of the driver or last driver if there is no new driver.

Installation / Usage:
_this select 0 - OBJECT - Player
_this select 1 - OBJECT - Vehicle
_this select 2 - NUMBER - Minutes till fuel empty when driving
_this select 3 - NUMBER - Minutes till fuel empty in neutral


Example for init.sqf:
if (!isDedicated) then {
	player addEventHandler ["GetInMan", {[_this select 0, _this select 2, 60, 180] execVM "scripts\kp_fuel_consumption.sqf";}];

Differs between "standing", "normal speed" and "turbo"
"turbo" -> If you use "Shift+W" to increase the speed above the speed you could reach with only "W" for acceleration
Moved from init.sqf to initPlayerLocal.sqf
Configuration moved inside the sqf instead of parameters at execVM


Forum topic:
- BI forums

Enable javascript to be able to download from Armaholic please!

Tags: Consumption,   Fuel,   Scripts,   Simulation