2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-11-26 13:56:19 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
2017-09-19 20:38:49 +00:00
|
|
|
* Function for opening doors and extending the hook for most vanilla and older Arma helos.
|
2015-11-26 13:56:19 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Helicopter <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2015-12-14 20:50:56 +00:00
|
|
|
* Amount of time to wait before deploying ropes <NUMBER>
|
2015-11-26 13:56:19 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2020-04-25 06:41:45 +00:00
|
|
|
* [_vehicle] call ace_fastroping_fnc_onPrepareCommon
|
2015-11-26 13:56:19 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
params ["_vehicle"];
|
2015-11-30 17:35:34 +00:00
|
|
|
|
2017-09-19 20:38:49 +00:00
|
|
|
private _waitTime = 2;
|
2015-11-26 13:56:19 +00:00
|
|
|
|
2017-09-19 20:38:49 +00:00
|
|
|
{_vehicle animateDoor [_x, 1]} forEach ANIMS_ANIMATEDOOR;
|
|
|
|
{_vehicle animate [_x, 1]} forEach ANIMS_ANIMATE;
|
2015-11-26 13:56:19 +00:00
|
|
|
|
2016-03-06 18:53:37 +00:00
|
|
|
_vehicle setVariable [QGVAR(doorsLocked), true, true];
|
|
|
|
|
2017-09-19 20:38:49 +00:00
|
|
|
private _fries = _vehicle getVariable [QGVAR(FRIES), objNull];
|
2015-11-26 13:56:19 +00:00
|
|
|
if !(isNull _fries) then {
|
|
|
|
[{
|
2017-09-19 20:38:49 +00:00
|
|
|
{_this animate [_x, 1]} forEach ANIMS_HOOK;
|
2016-05-22 13:27:24 +00:00
|
|
|
}, _fries, 2] call CBA_fnc_waitAndExecute;
|
2015-11-30 17:35:34 +00:00
|
|
|
_waitTime = 4;
|
|
|
|
};
|
2015-11-26 13:56:19 +00:00
|
|
|
|
2015-11-30 17:35:34 +00:00
|
|
|
_waitTime
|