OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: KingBuffalo on 09 Mar 2005, 20:08:52
-
I am new to making missions and have found this site to be an excellent resource. I have questions about ammo bugs I am getting in MP missions.
1. Sometimes when I walk up to an ammo crate, I get multiple options to take a weapon or ammo, like Take Handgrenade 5 times in a row. I am using a custom crate script where I have loaded the ammo I want in the crate. Are there limits to the number of weapons and magazines that can be in a crate?
2. Sometimes when I take ammo from a crate there will be lots of ammo on the floor. How do I fix this?
Thanks for the help.
-
Yes there are limits on what an ammo crate can hold.
I can't remember off-hand what the limits are, I'll maybe search around a bit and see what I can find, or you could try a forum search for the info.
The reason some ammo ends up on the ground is probably because the crate is full.
EDIT: Ok......I checked the config entries..and it seems weapons are limited to 500 and magazines are limited to 2000.....at least on the one I looked at.
Planck
-
I have seen ammo bug deletion scripts before. Its pretty much as simple as this:
#loop
_obj = nearestobject [player,"WeaponHolder"]
_obj2 = nearestobject [player,"SecondaryWeaponHolder"]
? (Isnull _obj) && (Isnull _obj2) : exit
deletevehicle _obj
deletevehicle _obj2
goto "loop"
of course this would also delete any mags or weapons you yourself have placed on the ground, but hey its better than having a ton of lag from the ammo bugs.