ACE3/addons/rearm/functions/fnc_canPickUpAmmo.sqf

22 lines
438 B
Plaintext
Raw Normal View History

2015-08-15 16:43:13 +00:00
/*
* Author: GitHawk
* Check if a unit can pick up ammo.
2015-08-15 16:43:13 +00:00
*
* Arguments:
* 0: Target <OBJECT>
* 1: Unit <OBJECT>
2015-08-15 16:43:13 +00:00
*
* Return Value:
* Can Pick Up Ammo <BOOL>
2015-08-15 16:43:13 +00:00
*
* Example:
2015-08-16 00:18:53 +00:00
* [player, tank] call ace_rearm_fnc_canPickUpAmmo
2015-08-15 16:43:13 +00:00
*
* Public: No
*/
#include "script_component.hpp"
params ["_target", "_unit"];
2015-08-15 16:43:13 +00:00
!(isNull _unit || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {(_target distance _unit) > REARM_ACTION_DISTANCE})