2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-03-16 19:39:49 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
2023-07-23 23:07:37 +00:00
|
|
|
* Checks if unit can drop the dragged object.
|
2015-03-16 19:39:49 +00:00
|
|
|
*
|
2015-08-09 12:53:13 +00:00
|
|
|
* Arguments:
|
2023-07-23 23:07:37 +00:00
|
|
|
* 0: Unit that is currently dragging an object <OBJECT>
|
|
|
|
* 1: Object being dragged <OBJECT>
|
2015-03-16 19:39:49 +00:00
|
|
|
*
|
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
|
2015-03-16 19:39:49 +00:00
|
|
|
*/
|
|
|
|
|
2015-08-09 12:53:13 +00:00
|
|
|
params ["_unit", "_target"];
|
2015-03-16 19:39:49 +00:00
|
|
|
|
2017-10-01 18:38:11 +00:00
|
|
|
if !([_unit, _target, ["isNotDragging", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-16 19:39:49 +00:00
|
|
|
|
|
|
|
_unit getVariable [QGVAR(draggedObject), objNull] == _target
|