ACE3/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf

22 lines
553 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
2015-02-18 04:37:04 +00:00
/*
* 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
*/
2015-08-15 22:07:17 +00:00
params ["_caller", "_target"];
Aircraft - Drone "Follow Unit" Waypoint Action (#9889) * Fix "Recharge" interaction showing on destroyed drone * Add "Follow Unit" action * Improve condition check * UGV Following via PFH that updates WP Pos * Use HOLD WP for all Follow Actions Since FOLLOW WP would stop working on AI Soldiers after some time. * Allow selecting a follow distance * Follow Distance under separate interaction, just like Loiter Alt Only visible when a HOLD waypoint is selected, which is pretty much always going to have been created by the "Follow" interaction. * Localize "Follow" Interaction * Show structuredText Hint when following/changing distance * Variable for cursorTarget Reuse * Better isKindOf condition use * Make "Ship"-kind vehicles followable * Clean up Comments and systemChat Debugs * Comment explanation for custom PFH solution over vanilla "Follow"-WP * Trim excess brackets from setWaypointPosition argument Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> * Broader determination for UGV follow distances Co-Authored-By: PabstMirror <pabstmirror@gmail.com> * Prevent infinite PFH loop if follow target is deleted Co-Authored-By: PabstMirror <pabstmirror@gmail.com> * Delete Follow WP when PFH terminates * The ternary rules Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Various requested changes Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-07-02 09:16:48 +00:00
(alive _target) && {"ACE_UAVBattery" in (_caller call EFUNC(common,uniqueItems))} && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4}