
All I want to have is a Supershotgun that requires you to manually reload by pressing altfire. I suck at A_JumpIfInventory.

Code: Select all
actor IDSuperShotgun : SuperShotgun
{
Inventory.PickupMessage "You got the UAC standard-issue combat shotgun!"
AttackSound "ultrasg/fire"
States
{
Select:
SHT2 A 0 A_Raise
SHT2 A 1 A_Raise
Goto Select
Deselect:
SHT2 A 0 A_Lower
SHT2 A 1 A_Lower
Goto Deselect
Hold:
Fire:
SHT2 A 0 A_JumpIfInventory("IDSuperShotgunLoad",0,5)
SHT2 A 3
SHT2 A 0 A_FireBullets (11.2, 7.1, 20, 5, "BulletPuff")
SHT2 A 5 A_GunFlash
SHT2 A 0 A_TakeInventory("IDSuperShotgunLoad",1)
SHT2 A 0
Goto Ready
AltFire:
SHT2 B 4 A_JumpIfInventory("IDSuperShotgunLoad",1,9)
SHT2 C 4 A_CheckReload
SHT2 D 5 A_PlaySound("weapons/sshoto")
SHT2 E 5
SHT2 F 4 A_PlaySound("weapons/sshotl")
SHT2 G 4
SHT2 H 0 A_PlaySound("weapons/sshotc")
SHT2 H 5
SHT2 A 3 A_GiveInventory("IDSuperShotgunLoad",1)
SHT2 A 0
Goto Ready
Flash:
SHT2 I 2 Bright A_Light1
SHT2 J 2 Bright A_Light2
SHT2 J 0 Bright A_Light0
Stop
}
}
actor IDSuperShotgunLoad : Ammo
{
Inventory.PickupMessage "If you read this then your dumb"
Inventory.Amount 1
Inventory.Maxamount 1
Ammo.Backpackamount 1
Ammo.Backpackmaxamount 1
}