ACE3/addons/fastroping/functions/fnc_onCutCommon.sqf

37 lines
962 B
Plaintext
Raw Normal View History

/*
* Author: BaerMitUmlaut
* Function for closing doors and retracting the hook for most vanilla and older Arma helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before cutting ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_fastroping_fnc_onCutRopesCommon
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle"];
2015-12-01 19:48:20 +00:00
private _fries = _vehicle getVariable [QGVAR(FRIES), objNull];
if !(isNull _fries) then {
{_fries animate [_x, 0]} forEach ANIMS_HOOK;
[{
{_this animateDoor [_x, 0]} forEach ANIMS_ANIMATEDOOR;
{_this animate [_x, 0]} forEach ANIMS_ANIMATE;
2016-03-06 18:53:37 +00:00
_this setVariable [QGVAR(doorsLocked), false, true];
}, _vehicle, 2] call CBA_fnc_waitAndExecute;
4
} else {
{_vehicle animateDoor [_x, 0]} forEach ANIMS_ANIMATEDOOR;
{_vehicle animate [_x, 0]} forEach ANIMS_ANIMATE;
2016-03-06 18:53:37 +00:00
_vehicle setVariable [QGVAR(doorsLocked), false, true];
2
};