Code: Select all
ACTOR BerettaAmmo : Ammo
{
Inventory.MaxAmount 8
Inventory.Icon BGPUA0
}
ACTOR BerettaClip : Ammo
{
Inventory.MaxAmount 8
Inventory.Amount 1
Inventory.PickupSound "ammo/beretta"
Ammo.BackpackAmount 1
Ammo.BackpackMaxAmount 8
Inventory.Icon BGCPA0
Inventory.PickupMessage "Picked up a Brigadier clip."
Scale 0.25
States
{
Spawn:
BGCP A -1
Stop
}
}
ACTOR Brigadier : Weapon replaces Pistol
{
Weapon.SelectionOrder 400
Inventory.PickupSound "weapons/pgunout"
Inventory.PickupMessage "Picked up a Beretta Brigadier"
Weapon.AmmoType1 "BerettaAmmo" //The guns magazine
Weapon.AmmoType2 "BerettaClip" //The real ammo
Weapon.AmmoGive 0
Weapon.AmmoGive2 1
Weapon.AmmoUse 1
Weapon.Kickback 70
Decal bulletchip1
AttackSound "beretta/fire"
+AMMO_OPTIONAL
+NOAUTOFIRE
Scale 0.25
States
{
Spawn:
BGPU A -1 bright
Loop
Ready:
TNT1 A 0 A_JumpIfNoAmmo(10)
BM9H ABCDEFG 1
BM9G A 2
BM9H H 2
BM9G A 2 A_WeaponReady
BM9G A 0 A_JumpIfInventory("IsReloading",1,15)
Goto Ready+10
BM9E BCDEFGHAI 1
BM9E A 2 A_WeaponReady
BM9E A 0 A_JumpIfInventory("IsReloading",1,15)
Goto Ready+19
Deselect:
TNT1 A 0 A_JumpIfNoAmmo(9)
BM9H GFEDCBA 1
TNT1 A 1 A_Lower
Goto Deselect+8
BM9E HGFEDCB 1
TNT1 A 1 A_Lower
Goto Deselect+16
Select:
TNT1 A 0 A_Raise
Goto Select
Fire:
TNT1 A 0
TNT1 A 0 A_JumpIfNoAmmo(14)
TNT1 A 0 BRIGHT A_GunFlash
BM9F B 1 BRIGHT A_FireBullets(2,2,-1,10,0,1)
BM9F C 1 BRIGHT
BM9F DE 1
TNT1 A 0 A_JumpIfNoAmmo(10)
BM9F DCB 1
Goto Ready+9
BM9F FGH 1
Goto Ready+19
BM9E A 1 A_Playsound("weapons/dryfire")
Goto Ready+19
//Reload:
TNT1 A 0 A_JumpIfNoAmmo(6)
TNT1 A 0 A_JumpIfInventory("BerettaAmmo",4,2)
TNT1 A 0 A_JumpIfInventory("BerettaClip",1,2)
TNT1 A 0
Goto Ready+9
TNT1 A 0 A_JumpIfInventory("BerettaAmmo",4,2)
TNT1 A 0 A_JumpIfInventory("BerettaClip",1,2)
TNT1 A 0
Goto Ready+19
TNT1 A 0 A_JumpIfNoAmmo(46)
BMR1 ABCDE 1
BMR1 F 6
BMR1 G 1 A_PlaySound("weapons/pgunout")
TNT1 A 0 A_TakeInventory("BerettaAmmo",999)
BMR1 HIJ 1
BMR1 K 18
BMR1 L 1
BMR1 M 1 A_PlaySOund("weapons/pgunin")
TNT1 A 0 A_TakeInventory("BerettaClip",1)
TNT1 A 0 A_GiveInventory("BerettaAmmo",999)
BMR1 NOPQ 1
BMR1 FEDCB 1
BMR1 A 6
BM9C ACEGIKM 1
TNT1 A 0 A_PlaySOund("weapons/pguncock")
BM9C OPQR 1
Goto Ready+9
BMR2 ABCDE 2
BMR2 F 6
BMR2 G 1 A_PlaySound("weapons/pgunout")
TNT1 A 0 A_TakeInventory("BerettaAmmo",999)
BMR2 HIJ 2
BMR2 K 18
BMR2 L 2
BMR2 M 2 A_PlaySound("weapons/pgunin")
TNT1 A 0 A_TakeInventory("BerettaClip",1)
TNT1 A 0 A_GiveInventory("BerettaAmmo",999)
BMR2 NOPQ 2
BMR2 FEDCB 1
BMR2 A 4
BM9C BDFHJLN 2
TNT1 A 0 A_PlaySound("weapons/pguncock")
BM9C OPQR 2
Goto Ready+9
Flash:
BM9F A 1 BRIGHT
stop
}