ACE3/addons/dragging/functions/fnc_canDrop.sqf

24 lines
554 B
Plaintext
Raw Normal View History

/*
* Author: commy2
* Check if unit can drop the object.
*
2015-08-09 12:53:13 +00:00
* Arguments:
* 0: Unit that currently drags a object <OBJECT>
* 1: Object that is dragged <OBJECT>
*
2015-08-09 12:53:13 +00:00
* Return Value:
* Can the unit drop the object? <BOOL>
*
2016-01-28 18:52:53 +00:00
* Example:
* [player, cursorTarget] call ace_dragging_fnc_canDrop;
*
2015-08-09 12:53:13 +00:00
* Public: No
*/
#include "script_component.hpp"
2015-08-09 12:53:13 +00:00
params ["_unit", "_target"];
if !([_unit, _target, ["isNotDragging", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
_unit getVariable [QGVAR(draggedObject), objNull] == _target