Home   Help Search Login Register  

Author Topic: Config.cpp: MagazineCargo  (Read 990 times)

0 Members and 1 Guest are viewing this topic.

Komuna

  • Guest
Config.cpp: MagazineCargo
« 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?
« Last Edit: 29 Sep 2003, 10:37:11 by Komuna »

Anmac

  • Guest
Re:Config.cpp: MagazineCargo
« Reply #1 on: 27 Sep 2003, 14:15:36 »
Try using these instead:

Code: [Select]
transportMaxMagazines = 4;
transportMaxWeapons = 0;

 ;)

Komuna

  • Guest
Re:Config.cpp: MagazineCargo
« Reply #2 on: 29 Sep 2003, 10:41:38 »
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

Komuna

  • Guest
Re:Config.cpp: MagazineCargo
« Reply #3 on: 06 Oct 2003, 15:08:37 »
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).
« Last Edit: 09 Oct 2003, 14:02:28 by Komuna »