OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: xXNismoXx on 03 Jan 2004, 06:26:17

Title: Ammo Bug
Post by: xXNismoXx on 03 Jan 2004, 06:26:17
I have ammo in the crates, everytime I change weapons or ammo, the items pop out onto the ground  >:( how do I fix this?
Title: Re:Ammo Bug
Post by: Artak on 03 Jan 2004, 13:47:06
The crates are overfilling. Can you describe the situation a bit more. Maybe addons and scripts your using with it?
Title: Re:Ammo Bug
Post by: Terox on 03 Jan 2004, 14:15:39
There is a limit to the capacity of ammo crates, although it is quite high, if you add lots of heavy AT and AA weaponry and ammo, it will definitely overfill the ammo crates

AA Launchers and Heavy AT take up a lot more cargo space than the personal weaponry and ammo

Another thing that can trigger the ammo bug is loading vehicles with weaponry. It doesnt take much to cause a spillage on Jeeps, Hmmv's etc


A work around is to have a trigger or a looping script check the quantity of weaponry and ammo in a crate and then if it empties or lowers, the script/trigger will refill it. This way you can reduce the quantity for the initial fill but keep it topped up throughout the game

Or simply have more ammo crates
Title: Re:Ammo Bug
Post by: xXNismoXx on 04 Jan 2004, 10:06:36
that would make since, I have 1000 ammo for every 100 weapons of one kind:

for example

m16 x 100
m16mag x 1000
I'm useing Chris's OFP editor to create .sqs files for the crates

you spawn with a weapon, go to choose another and wam! ammo and guns all over :(
and I have about six diferent weapons  in cargo, I just didn't want to run out of guns and ammo in a match lol, I'll just add more ammo crates, thanks for the info guys ;)

oh, does anyone know the capacity limit for a ammo crate?
Title: Re:Ammo Bug
Post by: Artak on 04 Jan 2004, 12:53:14
As Terox said the quantity of what a crate can hold varies with the type of weapons or ammo you put in there. I'm not sure it's ever been documented.

If you don't find any ready made reference, be a doll and make one and then submit it to the editors depot.  :D
Title: Re:Ammo Bug
Post by: Terox on 04 Jan 2004, 13:32:32
2000 cargo space comes to mind but i dont know from what dreaded depths of my mind that came from

So it may be wrong
Title: Re:Ammo Bug
Post by: HuNtA on 06 Jan 2004, 17:20:46
LOL, thats jus cuz were in 2004.

I think as a rule of thumb we should try to keep it below 500
Title: Re:Ammo Bug
Post by: Terox on 06 Jan 2004, 17:34:50
the value 2000 wasnt individual items, it was the cargo space of the crate. Each weapon/ammo takes up  different quantities of cargo space

The figure 2000 wasnt something i plucked up from nowhere, i recollect somewhere a discussion about the ammo bug some time back and remember this figure being bounced around
Title: Re:Ammo Bug
Post by: Zombie on 06 Jan 2004, 20:01:02
It's been my experience that the crates can hold:
500 weapons of any combination, as long as 500 is not exceeded
1000 magazines of any combination
binocs and nvg's dont seem to count as weapons tho for this limit

if you fill them with no more than 400 weps and 900 mags there should never be a problem
Title: Re:Ammo Bug
Post by: xXNismoXx on 07 Jan 2004, 07:56:30
thanks again ;)
Title: Re:Ammo Bug
Post by: KTottE on 07 Jan 2004, 10:47:30
Also remember that crates have weapons and magazines in them before you start adding your own, so if you're not going to use them I suggest using clearWeaponCargo and clearMagazineCargo on the crate.
Title: Re:Ammo Bug
Post by: Zombie on 07 Jan 2004, 14:43:43
DOH!  Excellent point, I completely forgot about that.  Chris's cratebuilder offers the option to clear stock crate, and the crate script I usually use has those commands in there also.
Title: Re:Ammo Bug
Post by: SPC. BLOODHAWK on 07 Jan 2004, 18:20:08
Can't he just make a ammo script, loop it and set a timer on 5 secs or something?