krimzin Posted January 16, 2010 Share Posted January 16, 2010 Hm, i know i've done this once somehow, but it was different. I had made a "Prototype Mobile Armory Power Armor" that works like having a ammo machine from Op:Anchorage strapped to you. So, in essence, if you had no 10mm ammo, it would immediately give you 120 rounds of 10mm ammo and if your 10mm ammo was depleted to 0 again, it would instantly refill it to 120. So if i'm getting this right, you want a container that uses the same principle? I.e. if it origionally has 400 10mm rounds in it and you take out, let's say 100 rounds, it will be scripted to add the 100 rounds back to itself so the box will always contain 400 10mm rounds? In other words, the ammo machines from operation: anchorage? lol Link to comment Share on other sites More sharing options...
DarkScience Posted January 16, 2010 Author Share Posted January 16, 2010 Never saw this ammo machine but ya that's pretty much what I'm going for. Link to comment Share on other sites More sharing options...
Cipscis Posted January 16, 2010 Share Posted January 16, 2010 Your script doesn't work because when you call GetContainer on a reference without a container, it returns 0. GetContainer is only useful when called on an inventory item. Try using this instead:ScriptName ALLBoxAmmoScript Begin OnOpen RemoveAllItems AddItem ALLAmmo 9999 EndCipscis Link to comment Share on other sites More sharing options...
Recommended Posts