2015-04-11 13:59:21 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
2015-04-11 14:27:04 +00:00
|
|
|
* Drops a backback. Also returns the ground wepaon holder object of the dropped backpack.
|
2015-04-11 13:59:21 +00:00
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: Unit that has a backpack (Object)
|
|
|
|
*
|
|
|
|
* Return value:
|
2015-04-11 14:27:04 +00:00
|
|
|
* Ground wepaon holder with backpack (Object)
|
2015-04-11 13:59:21 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
PARAMS_1(_unit);
|
2015-04-11 13:59:21 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
private ["_backpackObject","_holder"];
|
2015-04-11 13:59:21 +00:00
|
|
|
|
|
|
|
_backpackObject = backpackContainer _unit;
|
|
|
|
_unit addBackpack "Bag_Base";
|
|
|
|
removeBackpack _unit;
|
|
|
|
_holder = objNull;
|
|
|
|
|
|
|
|
{
|
|
|
|
if (_backpackObject in everyBackpack _x) exitWith {
|
|
|
|
_holder = _x;
|
|
|
|
};
|
|
|
|
} forEach (position _unit nearObjects ["WeaponHolder", 5]);
|
|
|
|
|
|
|
|
_holder
|