I've been following the reloading tutorial which was posted on Wildweasel's Doom Armory website, but I can't figure out what's going on. Please help me.
Code: Select all
ACTOR .45Pistol : Weapon replaces Pistol
{
+NOAUTOFIRE
+AMMO_OPTIONAL
Obituary "%o was capped by %k's trusty ol' .45."
AttackSound "weapons/pistol"
Weapon.AmmoType1 ".45MAG" //The guns magazine
Weapon.AmmoType2 ".45BULLETS" //The real ammo
Weapon.AmmoGive 0
Weapon.AmmoGive2 1
Weapon.AmmoUse 1
Weapon.SelectionOrder 6000
States
{
Ready:
PISG A 1 A_WeaponReady
PISG A 0 A_JumpIfInventory("IsReloading",1,11)
Loop
Deselect:
PISG A 1 A_Lower
Loop
Select:
PISG A 1 A_Raise
Loop
Fire:
PISG A 0 A_JumpIfNoAmmo(9)
PISG B 1 BRIGHT A_GunFlash
PISG B 1 A_FireBullets(2,1,-1,10,0,1,0)
PISG C 2
PISG D 2
PISG E 2
PISG C 2
PISG B 1
PISG A 0
Goto Ready
PISG A 1 A_Playsound("weapons/click")
//Reload:
PISR A 0 A_JumpIfInventory(".45MAG",8,2)
PISR A 0 A_JumpIfInventory(".45BULLETS",1,2)
Goto Ready
PISR A 0 A_TakeInventory(".45BULLETS",999)
PISR A 4
PISR B 3 A_PlaySound("weapons/pmagout")
PISR C 8
PISR B 3
PISR A 3
PISR A 4 A_PlaySound("weapons/pmagin")
PISR A 4
PISR D 4 A_PlaySound("weapons/pslide")
PISR D 0 A_GiveInventory(".45MAG",8)
PISR D 0 A_GiveInventory(".45BULLETS",999)
PISG A 1
Goto Ready
Flash:
PISF A 2 BRIGHT
stop
}
}
ACTOR .357Magnum : Weapon 14500
{
+NOAUTOFIRE
+AMMO_OPTIONAL
Obituary "%o's head was blown clean off by %k's .357 Magnum."
Inventory.Pickupmessage "You got the .357 Magnum!"
AttackSound "weapons/357"
Weapon.AmmoType "MAGNUMCLIP"
Weapon.AmmoType2 "MAGNUMAMMO"
Weapon.AmmoGive 0
Weapon.AmmoGive2 6
Weapon.AmmoUse 1
Weapon.SelectionOrder 5000
States
{
Spawn:
MAGN A -1
LOOP
Ready:
MAGG A 1 A_WeaponReady
Loop
Deselect:
MAGG A 1 A_Lower
Loop
Select:
MAGG A 1 A_Raise
Loop
Fire:
MAGG A 0 A_JumpIfNoAmmo(7)
MAGG A 1 BRIGHT A_GunFlash
MAGG A 3 A_FireBullets(2,1,-1,25,0,1,0)
MAGG B 5
MAGG C 3
MAGG D 2
MAGG A 0
Goto Ready
MAGG A 1 A_Playsound("weapons/click")
//Reload:
MAGR A 0 A_JumpIfInventory("MAGNUMAMMO",6,2)
MAGR A 0 A_JumpIfInventory("MAGNUMCLIP",1,2)
Goto Ready
MAGR A 0 A_TakeInventory("MAGNUMAMMO",999)
MAGR A 2
MAGR B 2
MAGR C 5 A_PlaySound("weapons/magnumopen")
MAGR D 1 A_PlaySound("weapons/magnumload1")
MAGR E 1
MAGR F 1
MAGR G 5
MAGR H 3
MAGR I 3 A_PlaySound("weapons/magnumload2")
MAGR I 0 A_GiveInventory("MAGNUMCLIP",6)
MAGR I 0 A_GiveInventory("MAGNUMAMMO",999)
MAGR J 2
MAGR K 2
MAGR L 2
MAGR M 4 A_PlaySound("weapons/magnumclose")
MAGR N 2
Goto Ready
Flash:
MAGF A 2 BRIGHT
stop
}
}