ACE3/addons/fastroping/functions/fnc_prepareFRIES.sqf
jonpas 40e4ad3f5a Add Stow FRIES interaction (#5533)
* Add stow FRIES interaction
Allows stowing FRIES (retracting the hooks, closing doors) without the need to deploy and cut ropes

* Do not automatically stow FRIES anymore

* Cleanup more privates
2017-09-21 16:16:04 +02:00

32 lines
815 B
Plaintext

/*
* Author: BaerMitUmlaut
* Prepares the helicopters FRIES.
*
* Arguments:
* 0: A helicopter with deployed ropes <OBJECT>
*
* Return Value:
* None
*
* Example:
* [_vehicle] call ace_fastroping_fnc_prepareFRIES
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle"];
//Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed
_vehicle setVariable [QGVAR(deploymentStage), 1, true];
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _waitTime = 0;
if (isText (_config >> QGVAR(onPrepare))) then {
_waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare))));
};
[{
_this setVariable [QGVAR(deploymentStage), 2, true];
}, _vehicle, _waitTime] call CBA_fnc_waitAndExecute;