TheJay 0 Posted November 12, 2007 I'm trying find what kind of weapons and magazines are in a vehicles cargo compartment. These are weapons and magazines that players have placed into the vehicle. When using weapons it only returns the vehicles weapons. Same thing happens with magazines, it just returns the ammo for the vehicle weapons. Or in the case of ammo boxes both commands returns empty arrays. Does anyone know of a way to find the contents of a vehicles cargo space? Share this post Link to post Share on other sites
dr_eyeball 16 Posted November 13, 2007 Unfortunately, I don't think you can. You can clear it and set it, but not get it. There are many "set" commands in ArmA scripting which have no corresponding "get" command, which is quite odd given that it is the easy part to do. Some examples: request on bug tracker Share this post Link to post Share on other sites
TheJay 0 Posted November 13, 2007 Thanks, I was afraid of that. Share this post Link to post Share on other sites
fasad 1 Posted November 13, 2007 If you really need to, you could some kind of brute force test: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> dummyUnit action ["TAKEMAGAZINE", vehicle, "pipebomb"]; if (count magazines dummyUnit > 0) then {<add information to an array of known mags being carried by vehicle>}; <delete mags/weapons carried by dummyUnit> <repeat for all known mag/weapon types> <replace weapons to the vehicle> Problems: - unpredictable delays caused by dummyUnit doing animations (seems gl can't takeMagazine or takeWeapon) - need to check every possible weapon/mag type - complicated script for simple task - probably very slow I've also tried the using weaponsPool, but it does not seem to update during the mission... Share this post Link to post Share on other sites