/* * Author: commy2 * Handles when a captive unit gets out of a vehicle. * * Arguments: * 0: _vehicle * 2: dunno * 1: _unit * * Return Value: * The return value * * Example: * [car2, x, player] call ACE_captives_fnc_handleGetOut * * Public: No */ #include "script_component.hpp" PARAMS_3(_vehicle,_dontcare,_unit); if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then { private ["_cargoIndex"]; _cargoIndex = _unit getVariable [QGVAR(CargoIndex), -1]; //If captive was not "unloaded", then move them back into the vehicle. if (_cargoIndex != -1) exitWith { _unit moveInCargo [_vehicle, _cargoIndex]; }; [_unit, "ACE_AmovPercMstpScapWnonDnon", 2] call EFUNC(common,doAnimation); };