ACE3/addons/dragging/functions/fnc_startDrag.sqf
Grim 8bc5f513b4
Dragging - Prevent multiple units carrying the same object (#9730)
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-01-13 13:39:39 -03:00

22 lines
465 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: johnb43
* Starts the dragging process safely.
*
* Arguments:
* 0: Unit that should do the carrying <OBJECT>
* 1: Object to drag <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorTarget] call ace_dragging_fnc_startDrag
*
* Public: No
*/
params ["_unit", "_target"];
// Try to claim the object
[QEGVAR(common,claimSafe), [_unit, _target, true, QGVAR(startDrag)]] call CBA_fnc_serverEvent;