Code: Select all
actor CPosGunMV : Chaingun replaces Chaingun
{
inventory.pickupmessage "You got the chaiingun, uzi, and trishot!"
weapon.ammotype2 Shell
states
{
Ready:
CHGG A 0 A_JumpIfInventory ("MCheck", 1, "ReadyM")
CHGG A 0 A_JumpIfInventory ("VCheck", 1, "ReadyV")
CHGG A 1 A_WeaponReady
loop
ReadyM:
UZIG A 1 A_WeaponReady
goto Ready
ReadyV:
TRIG A 1 A_WeaponReady
goto Ready
Fire:
PISG A 0 A_JumpIfInventory ("MCheck", 1, "FireM")
PISG A 0 A_JumpIfInventory ("VCheck", 1, "FireV")
CHGG AB 4 A_FireCGun
CHGG B 0 A_ReFire
Goto Ready
Flash:
SHTG A 0 A_JumpIfInventory ("MCheck", 1, "FlashM")
SHTG A 0 A_JumpIfInventory ("VCheck", 1, "Flash2")
CHGF A 5 Bright A_Light1
Goto LightDone
CHGF B 5 Bright A_Light0
Goto LightDone
FlashM:
TNT1 A 4 Bright A_Light1
Goto LightDone
TNT1 A 4 Bright A_Light0
Goto LightDone
Flash2:
TNT1 A 4 Bright A_Light1
Goto LightDone
TNT1 A 4 Bright A_Light0
Goto LightDone
FireM:
UZIG A 0 A_GunFlash
UZIG A 0 A_PlayWeaponSound ("weapons/uzi")
UZIG BC 2 A_FireBullets (9.5, 7.5, 1, 5)
UZIG A 10 A_ReFire
Goto Ready
FireV:
TRIG A 0 A_JumpIfInventory ("Shell", 1, 1)
goto Ready
TRIG A 0 A_JumpIfInventory ("Clip", 3, 1)
goto Ready
TRIG A 0 A_TakeInventory ("Shell", 1)
TRIG A 0 A_TakeInventory ("Clip", 2)
TRIG A 0 A_GunFlash
TRIG A 0 A_PlayWeaponSound ("weapons/shotgf")
TRIG B 4 A_FireBullets (7.6, 5.4, 6, 5)
TRIG A 10 A_CheckForReload (2, "RotLeft")
TRIG EDC 3 A_ResetReloadCounter
goto Ready
RotLeft:
TRIG A 10
TRIG CDE 3
goto Ready
Hold:
PISG A 0 A_JumpIfInventory ("MCheck", 1, "HoldM")
CHGG AB 4 A_FireCGun
CHGG B 0 A_ReFire
Goto Ready
HoldM:
UZIG A 0 A_GunFlash
UZIG A 0 A_PlayWeaponSound ("weapons/uzi")
UZIG BC 2 A_FireBullets (9.5, 7.5, 1, 5)
UZIG A 10 A_ReFire
goto Ready
}
}