ACE3/addons/common/functions/fnc_dropBackpack.sqf

26 lines
542 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
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
*
2015-09-20 20:16:51 +00:00
* Arguments:
* 0: Unit that has a backpack <OBJECT>
2015-04-11 13:59:21 +00:00
*
2016-06-18 09:50:41 +00:00
* Return Value:
2015-09-20 20:16:51 +00:00
* Ground wepaon holder with backpack <OBJECT>
2015-04-11 13:59:21 +00:00
*
* Example:
* [unit] call ace_common_fnc_dropBackpack
*
2015-09-20 20:16:51 +00:00
* Public: Yes
2015-04-11 13:59:21 +00:00
*/
params [["_unit", objNull, [objNull]]];
2015-04-11 13:59:21 +00:00
private _backpackObject = backpackContainer _unit;
2015-09-20 20:16:51 +00:00
_unit addBackpack "ACE_FakeBackpack";
2015-04-11 13:59:21 +00:00
removeBackpack _unit;
2015-09-20 20:16:51 +00:00
objectParent _backpackObject // return