OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Komuna on 24 Sep 2003, 11:11:13
-
...
class MMK_AssistantGunner : SoldierWB
{
class transportMagazines { magazine=M60; count=4 };
transportMaxMagazines=4;
transportMaxWeapons=0;
WeaponSlots = "..."
(...)
};
This is the general appearence of my addon. It's objective is to carry machinegun magazines as it was a AmmoTruck, so that the machine gunners could pick some ammo whenever they needed.
However, it has a serious bug:
Everytime I need M60 magazines (lets say I don't have anything), I can pick more than what really exists. So, if the Assistant Gunner has 4xM60mags, I can pick 5, and then, if I keep some with me and use others, I can pick more magazines, a infite number of them!!!
However, there still exists 4 Mags, as I empty my fourth, the others just disappear!
What shall I do?
-
Try using these instead:
transportMaxMagazines = 4;
transportMaxWeapons = 0;
;)
-
Thanks Anmac, for correcting me... Indeed, MaxWeaponCargo doesn't even exist! ::)
You know... I can't remind the commands and syntax and things like this happen...
My original config.cpp has the right commands (transportMaxMagazines instead of MaxMagazineCargo ;D), but my real problem is the bug I have described in the first post.
Note: such bug doesn't happen in a ammoCrate
-
So... Is it impossible?
#Edit
Yes, it's impossible. Besides, the AI won't get those mags by their own. Actually they only rearm at deadbodies, and they only take the primary weapon's mags - the secondary weapon is ignored (Unless the player orders the AI to do accomplish these actions).