ACE3/addons/fastroping/functions/fnc_onPrepareCommon.sqf

35 lines
803 B
Plaintext
Raw Normal View History

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