ACE3/docs/wiki/framework/refuel-framework.md
Dystopian 559a498e6d Add fast mouse actions to refuel, add refuel eden attributes (#5418)
* Add fast mouse actions to refuel

* nobody seen that

* Add interaction condition and refuel on ladder

* Add car hit, fix change weapon on uncon

* Replace objNull with nil in setVar, unify var names

* Delete *ConnectNozzle functions

* Delete reset* functions

* Add public function and eden attributes

* Remove static actions from RHS compat

* Remove statusEffect_set on respawn

* Fix dual menu, add deprecating message

* Optimize fnc_takeNozzle

* Cleanup
2017-09-10 14:43:03 -05:00

2.2 KiB

layout title description group order parent mod version
wiki Refuel Framework Explains how to set-up refueling of objects with the ACE3 refuel system. framework 5 wiki ace
major minor patch
3 4 0

1. Config Values

class CfgVehicles {
    class MyFuturisticMBT {
        ace_refuel_fuelCapacity = 3000; // set to correct path static model
    };
};
Note:

ace_refuel_fuelCapacity is only needed if you aren't inheriting from any of BI base classes or if your vehicle has a different fuel tank size.

2. Functions

2.1 Getting the fuel supply

ace_refuel_fnc_getFuel

Arguments Type Optional (default value)
0 Fuel Truck Object Required
R Fuel left (in liters) Number Return value

2.1.1 Example

[fuelTruck] call ace_refuel_fnc_getFuel;

Arguments Explanation
0 fuelTruck My fuel truck object

2.2 Make a jerry can

ace_refuel_fnc_makeJerryCan

Arguments Type Optional (default value)
0 My Object Object Required
1 Fuel amount (in liters) Number Optional (default: 20)
R None None Return value

2.2.1 Example 1

[can] call ace_refuel_fnc_makeJerryCan;

Arguments Explanation
0 can My jerry can object

The jerry can will have the default 20 liters volume.

2.2.2 Example 2

[can, 200] call ace_refuel_fnc_makeJerryCan;

Arguments Explanation
0 can My jerry can object
1 200 Vehicle class name

The jerry can will now have a volume of 200 liters.

2.3 Setting the fuel supply

ace_refuel_fnc_setFuel

Arguments Type Optional (default value)
0 Fuel Truck Object Required
1 Amount (in liters) Number Required
R None None Return value

2.3.1 Example

[fuelTruck, 428] call ace_refuel_fnc_setFuel;

Arguments Explanation
0 fuelTruck My fuel truck object
1 428 New fuel supply