Home   Help Search Login Register  

Author Topic: Config.CPP magazines and adding them  (Read 1293 times)

0 Members and 3 Guests are viewing this topic.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Config.CPP magazines and adding them
« on: 02 Jan 2004, 22:50:27 »
Okay, here's the problem:
I'm not exactly a config.cpp specialist, and I've inherited some units that are based off of various classes (M1Abrams and M2Static I believe), and I've modified them so they hve different mags and ammunition.  for example, I have

Weapon:
CoC_Howi155

Mags:
CoC_Howi155HE, CoC_Howi155WP, CoC_Howi155ICM, etc...

Ammo:
CoC_HE155, CoC_WP155, CoC_ICM155, etc.

Now, the problem is that the unit that carries this weapon (CoC_M109), starts by carrying all the mags specified in the magazines[] = entry in CfgVehicles.
All the magazines work, and the ammo I can identify and run various effects scripts on.
I can use RemoveMagazine to remove any of these magazines.
AddMagazine, however, refuses to work.  This is kinda important. Is there a config.cpp entry I've got wrong/screwed up?
Dinger/Cfit

Offline zandhaas

  • Members
  • *
Re:Config.CPP magazines and adding them
« Reply #1 on: 15 Jan 2004, 14:39:10 »
Hi,

Could you perhaps describe the problem in more detail? If you clear up some points it may help in finding an answer to the problem. Does the problem occur when ammunition is to be loaded onto the unit beyond that specified as a basic load in the cpp file or does it also occur when the load is completely emptied? One possible cause that comes to mind is that the maximum number of magazines may have been reached.

Regards,

Sander

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Config.CPP magazines and adding them
« Reply #2 on: 15 Jan 2004, 19:54:33 »
If you remove all mags from the unit, it still won't take any on.

We think it's an inheritance problem and rerouting the ancestors will solve it.
But why exactly it's happening is something I'd like to know.
Dinger/Cfit

Unnamed

  • Guest
Re:Config.CPP magazines and adding them
« Reply #3 on: 16 Jan 2004, 00:29:52 »
I had the same problem with the SEB Nam and Inv44 mortars, but saying that. I cant get it to work with a bog standard M1A1 either?

Rastavovich

  • Guest
Re:Config.CPP magazines and adding them
« Reply #4 on: 16 Jan 2004, 13:21:48 »
That seem to be a gamebug (similar if not the same problem that you cannot rearm an empty magazine on vehicles).

If you just want to disable certain ammo types on your vehicle, use one weapon for every ammo type and remove the weapon.

If your problem occurs when you try reloading your weapon, I don't know a good solution yet.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Config.CPP magazines and adding them
« Reply #5 on: 01 Feb 2004, 04:49:01 »
reposting from the coc forums:

Quote
I think I found the problem affecting addmagazine and rearming in UA.
Finally.
For the record, here is the bug, as I understand it:

Magazines that share the same beginning as an entry in CfgModels cannot be added.  The CfgModels entry can be added instead (but not used).  The same is true of all their children.

So in UA 1.0 all shell artillery descends off of CoC_mortar81, but there is also a CfgModels entry CoC_mortar81, so no shell mags can be added.
The MLRS is off of the hellfire launcher, but the magazine/weapon name is CoC_MLRSLauncher.  And, you guessed it, there's a CoC_MLRS model.
I'm going to mess around and see if we've got it licked now.
Dinger/Cfit