2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-02-04 05:13:44 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
|
|
|
* Loads a captive into a vehicle
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Captive <OBJECT>
|
|
|
|
* 1: The Vehicle <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-02-04 05:13:44 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-02-06 23:03:56 +00:00
|
|
|
* [bob, car1] call ACE_captives_fnc_vehicleCaptiveMoveIn;
|
2015-02-04 05:13:44 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-08-04 23:15:20 +00:00
|
|
|
params ["_target","_vehicle"];
|
2015-08-23 17:32:46 +00:00
|
|
|
TRACE_2("params",_target,_vehicle);
|
2015-08-04 23:15:20 +00:00
|
|
|
|
2016-09-13 21:52:51 +00:00
|
|
|
private _getSeat = [_vehicle] call FUNC(findEmptyNonFFVCargoSeat);
|
2015-08-23 17:32:46 +00:00
|
|
|
TRACE_1("free cargo seat",_getSeat);
|
2016-09-04 14:44:22 +00:00
|
|
|
_getSeat params ["_cargoIndex"];
|
2016-09-13 21:52:51 +00:00
|
|
|
if (_cargoIndex == -1) exitWith {WARNING("cargo index -1");};
|
2015-08-15 02:29:01 +00:00
|
|
|
|
2015-08-23 17:32:46 +00:00
|
|
|
_target moveInCargo [_vehicle, _cargoIndex];
|
|
|
|
_target assignAsCargoIndex [_vehicle, _cargoIndex];
|
2015-08-20 09:20:46 +00:00
|
|
|
|
2015-02-06 09:38:27 +00:00
|
|
|
_target setVariable [QGVAR(CargoIndex), _cargoIndex, true];
|