ACE3/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf
2015-02-17 22:37:04 -06:00

22 lines
502 B
Plaintext

/*
* Author: marc_book
* Tests if unit can refuel the target UAV
*
* Arguments:
* 0: Player <OBJECT>
* 1: UAV <OBJECT>
*
* Return Value:
* Can the player rechange the UAV <BOOL>
*
* Example:
* [player, theUAV] call ace_logistics_uavbattery_fnc_canRefuelUAV
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_2(_caller,_target);
("ACE_UAVBattery" in (items _caller)) && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4}