/*
	FILE: fnc_unfold.sqf

	Name: tbd_m119_m119_fnc_unfold

	Author(s):
		ilbinek

	Description:
		Fold the M119

	Parameters:
		_arty	- object	- M119 to be unfolded

	Returns:
		Nothing
	
	Examples:
		> [_arty] call tbd_m119_m119_fnc_unfold;

	Public:
		No
*/

#include "..\script_component.hpp"

params ["_arty"];

if !([_arty] call FUNC(canUnfold)) exitWith {};

_arty lock false;

// animate
_arty animateSource ["plate_back_source", 1, true];
_arty animateSource ["plate_front_source", 0, true];
_arty animateSource ["mainTurretT_source", 0];
_arty animateSource ["mainGunT_source", 0];
_arty animateSource ["hydraulicsT_source", 0];

_arty setVariable [QGVAR(folded), false, true];
_arty enableRopeAttach true;
