Author Topic: How do I make a weapon compatible with Rot's ammo system?  (Read 812 times)

I can't find anything related to it in the zombie mod's .zip, even though SolarFlare made his revolver work with the system, I want to change the amount of bullets for a gun.

So look at the revolver..

I want to change the amount of bullets for a gun
Instead of, say, 20 bullets, I want something more along the lines of 50.

So change the revolver's 20 to a 50...

Honestly, you really are lazy.

I've looked at the revolver's script long before making this topic, it's just that there is no reference to the number of bullets at all.

Code: [Select]
// Rotondo's Zombies

function sfRevolverZombies()
{
   if(isObject(gunImageNoFire))
   {
      datablock ShapeBaseImageData(sfRevolverImageNoFire : gunImageNoFire)
      {
         shapeFile = "./revolver.dts";
         RWep = "sfRevolverImage";
         projectile = sfRevolverProjectile;
         doColorShift = sfRevolverItem.doColorShift;
         colorShiftColor = sfRevolverItem.colorShiftColor;
      };
   }
}
schedule(100, 0, sfRevolverZombies);

Fair enough then. I think this is the code you'd use:

Code: [Select]
$zombie::ammo::Gun[$zombie::ammo::Listcount++] = ShotgunProjectile;
$zombie::ammo::AmmoShotgunProjectile = 20;

Make sure to replace ShotgunProjectile with the name of your projectile datablock.