Hey guys, I've got some good news. I've finished the 9MM pistol and I even added in two new enemies. Unfortunately, they aren't Lizards. They're just normal pistol human soldiers. Don't worry, there will eventually be new enemies done with the Lizards. With this release, those two guys will be the only new enemies.
Aside from the good news I have one problem. The 9MM pistol will still shoot three shots with the triple-round burst fire shot even though it'll run out of ammo. For example, I have 2 bullets left in the magazine and I use the secondary function, which is the 3 round burst and it'll still shoot three shots. How do I stop it from doing that. Also, when I use the three-round burst, the gun flash won't show up. Here's the coding for the entire gun:
 
Code: Select all
ACTOR 9MMPISTOL : Weapon 13500
{
   +NOAUTOFIRE
   +AMMO_OPTIONAL
   -ALT_AMMO_OPTIONAL
   +NOEXTREMEDEATH
      Inventory.Pickupmessage "You got the 9MM Pistol!"
      Obituary "%o was popped by %k's 9MM Pistol."
   AttackSound "weapons/Glockfire"
   Weapon.AmmoType "9MMPISTOLCLIP"
   Weapon.AmmoType2 "9MMAMMO"
   Weapon.AmmoGive 0
   Weapon.AmmoGive2 15
   Weapon.AmmoUse 1
   Weapon.SelectionOrder 675
   States
   {
   Spawn:
      GLCK A -1
      LOOP
   Ready:
      GLKG A 1 A_WeaponReady
      GLKG A 0 A_JumpIfInventory("IsReloading",1,1)
      Loop
      GLKG A 1
      Goto Fire + 7
   Deselect:
      GLKG A 1 A_Lower
      Loop
   Select:
      GLKG A 1 A_Raise
      Loop
   Fire:
      GLKG A 0 A_JumpIfNoAmmo(6)
      GLKG A 1 BRIGHT A_GunFlash
      GLKG B 2 A_FireBullets(2,2,-1,6,0,1,0)
      GLKG C 2
      GLKG B 2
      GLKG A 0
      Goto Ready
      GLKG A 1 A_Playsound("weapons/click")
    //Reload: also Fire + 10
      GLKR A 0 A_JumpIfInventory("9MMPISTOLCLIP",0,2)
      GLKR A 0 A_JumpIfInventory("9MMAMMO",1,2)
      GLKR A 0
      Goto Ready
      GLKR A 4
      GLKR B 3 A_PlaySound("weapons/pmagout")
      GLKR C 8
      GLKR D 3
      GLKR E 3
      GLKR F 4 A_PlaySound("weapons/pmagin")
      GLKR F 4
      GLKR F 4 A_PlaySound("weapons/pslide")
      GLKR F 0 A_GiveInventory("9MMPISTOLCLIP",1)
      GLKR F 0 A_TakeInventory("9MMAMMO",1)
      GLKR A 0 A_JumpIfInventory("9MMPISTOLCLIP",0,2)
      GLKR A 0 A_JumpIfInventory("9MMAMMO",1,2)
      GLKR A 1
      Goto Ready
      GLKR A 0
      Goto Fire + 18
   AltFire:
      GLKG A 0 A_JumpIfInventory("9MMPISTOLCLIP",1,2)
      Goto Fire + 6
      GLKG A 1 BRIGHT A_GunFlash
      GLKG A 0 BRIGHT A_TakeInventory("9MMPISTOLCLIP",1)
      GLKG B 2 A_FireBullets(3,2,-1,6,0,1,0)
      GLKG A 1 BRIGHT A_GunFlash
      GLKG A 0 BRIGHT A_TakeInventory("9MMPISTOLCLIP",1)
      GLKG B 2 A_FireBullets(3,2,-1,6,0,1,0)
      GLKG A 1 BRIGHT A_GunFlash
      GLKG A 0 BRIGHT A_TakeInventory("9MMPISTOLCLIP",1)
      GLKG B 2 A_FireBullets(3,2,-1,6,0,1,0)            
      GLKG C 2
      GLKG B 2
      GLKG A 0
      Goto Ready   
   Flash:
      GLKF A 1 BRIGHT A_Light1 
      GLKF A 0 A_Light0       
      stop
  }
}