OFPEC Forum
Addons & Mods Depot => ArmA - Configs & Scripting => Topic started by: Mr.Peanut on 23 Jun 2008, 15:58:56
-
I am puzzled about the config for magazines. The initSpeed of an M119 artillery can be determined by:
_muzzleVelocity = getNumber (configFile >> "cfgMagazines" >> "30Rnd_105mmHE_M119" >> "initSpeed");
but the muzzle, magazine and ammo types returned by a fired event handler are simply M119, SH_105_HE.
Where does "30Rnd_105mmHE_M119" come from? For a given vehicle(or weapon) how do you retrieve this value from the config? I realise that many vehicles have more than one muzzle.
-
Well, ...
"M119" is the weapon name
"30Rnd_105mmHE_M119" is the magazine name
"Sh_105_HE" is the ammo name.
So, the "M119" fires the "Sh_105_HE" ammo and it comes in magazines called "30Rnd_105mmHE_M119", which contain 30 X "Sh_105_HE".
Hope that muddies the water a bit. ;)
Planck
-
Yes, but given a vehicle with multiple weapons/magazines, how would I generate a list of possible magazines?
-
The vehicles config entry:
magazines [] = {bla,blah,blahblah};
will list them all ...
Likewise the entry:
weapons [] = {bla,blah,blahblah};
will list the weapons the vehicle uses.
In the case of the M119, it only has the one weapon and hence only one magazine...., so:
weapons[]={M119};
magazines[]={30Rnd_105mmHE_M119};
Planck