ACE3/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf

31 lines
713 B
Plaintext
Raw Normal View History

#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:
* 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
*/
params ["_target","_vehicle"];
2015-08-23 17:32:46 +00:00
TRACE_2("params",_target,_vehicle);
private _getSeat = [_vehicle] call FUNC(findEmptyNonFFVCargoSeat);
2015-08-23 17:32:46 +00:00
TRACE_1("free cargo seat",_getSeat);
_getSeat params ["_cargoIndex"];
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];