mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
24 lines
553 B
Plaintext
24 lines
553 B
Plaintext
/*
|
|
* Author: commy2
|
|
* Check if unit can drop the carried object.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit that currently carries a object <OBJECT>
|
|
* 1: Object that is carried <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can the unit drop the object? <BOOL>
|
|
*
|
|
* Example:
|
|
* [player, cursorTarget] call ace_dragging_fnc_canDrop_carry;
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit", "_target"];
|
|
|
|
if !([_unit, _target, ["isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
|
|
_unit getVariable [QGVAR(carriedObject), objNull] == _target
|