ACE3/addons/refuel/functions/fnc_cutTiltRope.sqf
2015-08-13 19:33:55 +02:00

34 lines
728 B
Plaintext

/*
* Author: GitHawk
* Disconnects the tilting rope
*
* Arguments:
* 0: The target <OBJECT>
*
* Return Value:
* NIL
*
* Example:
* [player] call ace_logistics_fnc_cutTiltRope
*
* Public: Yes
*/
#include "script_component.hpp"
private ["_rope"];
params ["_unit"];
_rope = _unit getVariable [QGVAR(tiltRope), nil];
if !(isNil "_rope") then {
ropeDestroy _rope;
};
(_unit getVariable QGVAR(tiltVehicle)) setVariable [QGVAR(tiltUp), nil, true];
(_unit getVariable QGVAR(tiltVehicleTow)) setVariable [QGVAR(tiltUp), nil, true];
_unit setVariable [QGVAR(tiltVehicle), nil];
_unit setVariable [QGVAR(tiltVehicleTow), nil];
_unit setVariable [QGVAR(isTilting), nil];
_unit setVariable [QGVAR(tiltRope), nil];
true