ACE3/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf

24 lines
605 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
2015-03-18 20:33:00 +00:00
/*
* Author: commy2, johnb43
* Return all magazine types from reloader's inventory that are compatible with the given launcher.
2015-03-18 20:33:00 +00:00
*
2016-06-18 09:50:41 +00:00
* Arguments:
* 0: Unit wanting to execute the reload <OBJECT>
* 1: Launcher name <STRING>
2015-03-18 20:33:00 +00:00
*
2016-06-18 09:50:41 +00:00
* Return Value:
* Reloable magazines <ARRAY>
*
* Example:
* [player, "launch_RPG32_F"] call ace_reloadlaunchers_fnc_getLoadableMissiles
2016-04-28 03:58:47 +00:00
*
* Public: No
2015-03-18 20:33:00 +00:00
*/
2016-04-28 03:58:47 +00:00
params ["_unit", "_weapon"];
TRACE_2("params",_unit,_weapon);
2015-03-18 20:33:00 +00:00
// Look for primary muzzle magazines only
(compatibleMagazines [_weapon, "this"]) arrayIntersect (magazines _unit)