iceman77 18 Posted November 29, 2013 (edited) Dead bodies create weaponHolders (:confused:). However, when I use: waitUntil {!alive man1}; _weaponHolders = nearestObjects [player, ["weaponHolder","groundWeaponHolder"],50]; hint format ["%1 : %2", count _weaponHolders, _weaponHolders]; It returns 0 and an empty array after I kill the unit. I simply want to make an unarmed unit take a weapon from the nearest body and I figured this was the best place to start, as I can't simply use takeWeapon on a dead body any longer. As the primaryWeapon for a dead body in A3 for example, is an empty string and not the weapon the unit had before he died. Edited November 30, 2013 by Iceman77 Share this post Link to post Share on other sites
Mattar_Tharkari 10 Posted November 30, 2013 More types of weapon holder than that in A3? Maybe dead bodies uses one of the others? Will try and test that when I get time - busy at moment. Share this post Link to post Share on other sites
zapat 55 Posted November 30, 2013 _holders = nearestObjects [getPos player, ["WeaponHolderSimulated", "GroundWeaponHolder", "Default"], _radius]; Share this post Link to post Share on other sites
iceman77 18 Posted November 30, 2013 Thanks guys. What exactly is default for? Share this post Link to post Share on other sites
zapat 55 Posted November 30, 2013 (edited) I don't remember anymore. I just remember having spent hours on this line alone and this is what I came up with. So I trust myself that it has to be in there. :D Edit: Or it is just a misfired ctrl-V. :) dead soliders seem to all keep their weapons in weaponholderSimulated. Other than that WeaponholderSimulated is handled by phisics engine, whereas GroundWeaponHolder is not. Edited November 30, 2013 by zapat Share this post Link to post Share on other sites
iceman77 18 Posted November 30, 2013 Ahh okay. Thanks once again. Share this post Link to post Share on other sites
Guest Posted October 6, 2016 When i delete the dead body, the weapon dissapears. Any way to avoid that? Share this post Link to post Share on other sites