Home   Help Search Login Register  

Author Topic: Multiple ammo types?  (Read 1083 times)

0 Members and 1 Guest are viewing this topic.

Ares1978

  • Guest
Multiple ammo types?
« on: 27 Sep 2002, 17:45:31 »
I am currently making a shoulder fired weapon that uses 2 types of ammo, HE and AP. Could someone give some instruction on how to define the two ammo types in the config.cpp? One type is no problem to make, but I can't get the two to work together. One should explode on impact and the other shouldn't.

Lucknow

  • Guest
Re:Multiple ammo types?
« Reply #1 on: 28 Sep 2002, 14:17:24 »
This should work...

You'll notice the M16 can fire mortars as well as bullets (i.e. 2 ammo types).

So define 2 'magazines' in the main body of the weapon cfgweapon section, i.e.

magazine[]={"HEmag","APmag"};

then make sure you define these 'mag' types as seperate classes which include the proper ammo type that you've already defined in the cfgammo section of the cpp file, i.e.

class HEmag: YourRifle
ammo="HEbullet";

and ...

class AP mag: YourRifle
ammo="APbullet";

If you then give the soldier say 4 mags of each type in his inventory you should get the option to reload whichever one you want to fire, AP or HE.