Jump to content
Sign in to follow this  
KaRRiLLioN

What is the class name for overflowed ammo?

Recommended Posts

What is the classname for the overflowed ammo, i.e. when someone loads a vehicle with ammo and then it spills out those little packets everywhere? This is from the Res ammo bug.

I've run some searches, but the search for ammo bug, etc. pulls way too many hits, and none of them seem to have it.

I want to add a script that removes those when they spawn.

Thanks!

Share this post


Link to post
Share on other sites

from commented config:

class WeaponHolder : ReammoBox

{

scope = protected;

model = "\misc\dummyweapon.p3d";

accuracy = 1000;

class TransportMagazines

{

};

forceSupply = true;

showWeaponCargo = true;

};

Share this post


Link to post
Share on other sites

Which config was that in? O.pbo's? I ran a search in O.pbo for that before posting because someone told me that was it, but it came back empty.

Thanks!

Share this post


Link to post
Share on other sites

its in the main config

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class WeaponHolder : ReammoBox

{

scope=1;

model="\misc\dummyweapon.p3d";

accuracy=0.200000;

class TransportMagazines

{

};

forceSupply=1;

showWeaponCargo=1;

transportMaxMagazines=1000000000.000000;

transportMaxWeapons=1000000000.000000;

displayName="";

};

Share this post


Link to post
Share on other sites
What is the classname for the overflowed ammo, i.e. when someone loads a vehicle with ammo and then it spills out those little packets everywhere?  This is from the Res ammo bug.

I've run some searches, but the search for ammo bug, etc. pulls way too many hits, and none of them seem to have it.

I want to add a script that removes those when they spawn.

Thanks!

WHAT?? wat ya mean the overflow?

Share this post


Link to post
Share on other sites

overflowed ammo from a vehicle happens for two reasons I think.

when a vehicle has weapons/ammo in cargo and you take a different weapon which automatically takes ammo for it you also automatically leave your current weapon and ammo. If you've exceeded the max cargo the extra spills out onto the ground.

the worse version is when you are attempting to load weapons/ammo into a vehicle by using the "Put <weapon> to <vehicle>". If you put only 1 weapon in ever and take it out before putting in another then the worst overflow you'll see is mentioned in the first version. But if you forget there is already a weapon or try to put 2 in, ammo and/or weapons begin(s) spilling out onto the ground in a continuous loop. Eventually if left unchecked this condition (called "ammo bug") will eat up enough memory or cpu cycles to bring down the server.

I was playing around with missile or bullet cams (which requires detecting fired objects) a couple of weeks ago and this got me wondering the exact same thing Karr asked about here. Do you have a script posted somewhere yet?

Something else I can think of is to run scripts on vehicles that watch the weapons/ammo cargo and take action if too much is loaded. I'll do some testing to see if it's possible to head off either ammo problem with this method.

Share this post


Link to post
Share on other sites

I hope that it will be possible to create a script that will delete those spawned packages once the bug is triggered. Hopefully though, it will be possible to differenciate between those packages the player puts down intentionally, like giving ammo to other players and those packages that are caused by the bug.

The perfect thing would be a solution provided by BIS, but as they stated that they won't be able to fix all bugs that have been around in OFP for a long time, I don't think this is going to happen.

Share this post


Link to post
Share on other sites

When I tried creating "ReammoBox" I ended up with an ammo crate not the little ammo pouch so I don't think this is it. Am I wrong? Has anyone found what the little pouches are called?

It would be easy to addAction to a player that would search for nearestObject looking for the correct object and then once you've got the object targeted you could delete it.

It would be very handy to have a nearestObject command that gave back the type rather than you having to provide it even if it only works when running from the editor or something and not in a compiled mission.

Share this post


Link to post
Share on other sites
Quote[/b] ]class WeaponHolder : ReammoBox

Actually, its "WeaponHolder", not ReammoBox wink_o.gif

And yes, I've tried and its possible to detect these with NearestObject, and delete them.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×