jonpetro Posted October 9, 2011 Share Posted October 9, 2011 I'm working on a mod that randomly assigns new weapons to enemies. The problem is, these enemies need ammo for their new gear, and I'm not particularly keen on manually adding the different ammo types on a case-by-case basis. I've tried something like: set rAmmo to rWeapon.GetWeaponAmmorMob.additem rAmmo 20 ..but evidently the function doesn't work the way I need it to. Any ideas would be appreciated. Link to comment Share on other sites More sharing options...
SothaSilxxx Posted October 9, 2011 Share Posted October 9, 2011 There is a NVSE function for this: GetPlayerCurrentAmmo example:ref rAmmoSet rAmmo to GetPlayerCurrentAmmorMob.additem rAmmo 20 Link to comment Share on other sites More sharing options...
Cipscis Posted October 10, 2011 Share Posted October 10, 2011 GetWeaponAmmo should work, but make sure that, assuming you're using "rWeapon" to store the formID of the weapon's base form, you supply it as a parameter instead of trying to use it like a reference:GetWeaponAmmo rWeaponCipscis Link to comment Share on other sites More sharing options...
Recommended Posts