tente fazer com vars, ou qualquer coisa da uma olhada numa shotgun que eu fiz:
// --------------------------------------------------------------------------
//
// Shotgun
//
// --------------------------------------------------------------------------
ACTOR Shotgun_64 : DoomWeapon Replaces Shotgun
{
SpawnID 27
Weapon.SelectionOrder 1300
Weapon.AmmoUse 1
Weapon.AmmoGive1 0
Weapon.AmmoGive2 8
Weapon.AmmoType1 "Shotgun-holder"
Weapon.AmmoType2 "Shell2"
Inventory.PickupMessage "$GOTSHOTGUN"
Obituary "$OB_MPSHOTGUN"
+AMMO_OPTIONAL
+ALT_AMMO_OPTIONAL
States
{
Ready:
SHTG A 1 A_WeaponReady
SHTG A 0 A_JumpIfInventory("Reload", 1, "RELOAD")
Loop
Deselect:
SHTG A 1 A_Lower
Loop
Select:
SHTG A 1 A_Raise
Loop
Fire:
SHTG A 0 A_JumpIfNoAmmo("RELOAD")
SHTG A 0 A_JumpIfInventory("Single", 1, "Single")
SHTG A 0 A_JumpIfInventory("Automatic", 1, "Automatic")
Single:
SHTG A 0 A_JumpIfNoAmmo("RELOAD")
SHTG A 7 A_GunFlash
SHTG BC 3
Goto Reloading
Automatic:
SHTG A 0 A_JumpIfNoAmmo("RELOAD")
SHTG A 3
SHTG A 7 A_GunFlash
SHTG BCB 5
SHTG A 0 A_JumpIfNoAmmo("RELOAD")
Goto Ready
RELOAD:
SHTG A 0 A_TakeInventory("Reload", 1)
SHTG A 0 A_JumpIfInventory("Shotgun-Holder", 8, "Ready")
SHTG A 0 A_JumpIfInventory("Shell2", 1, "RELOADING")
Goto Ready
RELOADING:
SHTG A 0 A_JumpIfInventory("Shell2", 1, 1)
Goto RELOADFINISH
SHTG DE 5
SHTG A 0 A_TakeInventory("Shell2", 1)
SHTG A 0 A_GiveInventory("Shotgun-Holder", 1)
SHTG A 0 A_PlaySound("weapons/shotgr", CHAN_WEAPON)
SHTG FE 5
SHTG A 0 A_JumpIfInventory("Shotgun-Holder", 8, "RELOADFINISH")
loop
RELOADFINISH:
SHTG D 4
SHTG CB 4
Goto Ready
AltFire:
SHTG A 0 A_JumpIfInventory("Automatic", 1, "Alt.Single")
Alt.Automatic:
SHTG A 0 A_Print("Automatic!")
SHTG A 0 A_GiveInventory("Automatic", 1)
SHTG A 0 A_TakeInventory("Single", 1)
SHTG ABCBABCBABCBA 1
Goto Ready
Alt.Single:
SHTG A 0 A_Print("Single!")
SHTG A 0 A_GiveInventory("Single", 1)
SHTG A 0 A_TakeInventory("Automatic", 1)
SHTG ABCBA 1
Goto Ready
Flash:
SHTG A 0 A_PlaySound("weapons/sshotf", CHAN_WEAPON)
SHTG A 0 A_FireBullets(9, 9, 7, 8)
SHTF A 4 Bright A_Light1
SHTF B 3 Bright A_Light2
Goto LightDone
Spawn:
SHOT A -1
Stop
}
}
Actor Single : Inventory { Inventory.Amount 1 Inventory.MaxAmount 1 }
Actor Automatic : Inventory { Inventory.Amount 1 Inventory.MaxAmount 1 }
actor shotgun-holder : ammo {
inventory.amount 1
inventory.maxamount 8
ammo.backpackamount 1
ammo.backpackmaxamount 8
inventory.icon "shela0" }
// Shells ------------------------------------------------------------------
ACTOR Shell2 : Ammo Replaces Shell
{
SpawnID 12
Inventory.PickupMessage "$GOTSHELLS"
Inventory.Amount 4
Inventory.MaxAmount 50
Ammo.BackpackAmount 4
Ammo.BackpackMaxAmount 100
Inventory.Icon "SBOXA0"
States
{
Spawn:
SHEL A -1
Stop
}
}
// Shell box ------------------------------------------------------------------
ACTOR ShellBox2 : Shell2 Replaces ShellBox
{
SpawnID 143
Inventory.PickupMessage "$GOTSHELLBOX"
Inventory.Amount 20
States
{
Spawn:
SBOX A -1
Stop
}
}
//
// Shotgun
//
// --------------------------------------------------------------------------
ACTOR Shotgun_64 : DoomWeapon Replaces Shotgun
{
SpawnID 27
Weapon.SelectionOrder 1300
Weapon.AmmoUse 1
Weapon.AmmoGive1 0
Weapon.AmmoGive2 8
Weapon.AmmoType1 "Shotgun-holder"
Weapon.AmmoType2 "Shell2"
Inventory.PickupMessage "$GOTSHOTGUN"
Obituary "$OB_MPSHOTGUN"
+AMMO_OPTIONAL
+ALT_AMMO_OPTIONAL
States
{
Ready:
SHTG A 1 A_WeaponReady
SHTG A 0 A_JumpIfInventory("Reload", 1, "RELOAD")
Loop
Deselect:
SHTG A 1 A_Lower
Loop
Select:
SHTG A 1 A_Raise
Loop
Fire:
SHTG A 0 A_JumpIfNoAmmo("RELOAD")
SHTG A 0 A_JumpIfInventory("Single", 1, "Single")
SHTG A 0 A_JumpIfInventory("Automatic", 1, "Automatic")
Single:
SHTG A 0 A_JumpIfNoAmmo("RELOAD")
SHTG A 7 A_GunFlash
SHTG BC 3
Goto Reloading
Automatic:
SHTG A 0 A_JumpIfNoAmmo("RELOAD")
SHTG A 3
SHTG A 7 A_GunFlash
SHTG BCB 5
SHTG A 0 A_JumpIfNoAmmo("RELOAD")
Goto Ready
RELOAD:
SHTG A 0 A_TakeInventory("Reload", 1)
SHTG A 0 A_JumpIfInventory("Shotgun-Holder", 8, "Ready")
SHTG A 0 A_JumpIfInventory("Shell2", 1, "RELOADING")
Goto Ready
RELOADING:
SHTG A 0 A_JumpIfInventory("Shell2", 1, 1)
Goto RELOADFINISH
SHTG DE 5
SHTG A 0 A_TakeInventory("Shell2", 1)
SHTG A 0 A_GiveInventory("Shotgun-Holder", 1)
SHTG A 0 A_PlaySound("weapons/shotgr", CHAN_WEAPON)
SHTG FE 5
SHTG A 0 A_JumpIfInventory("Shotgun-Holder", 8, "RELOADFINISH")
loop
RELOADFINISH:
SHTG D 4
SHTG CB 4
Goto Ready
AltFire:
SHTG A 0 A_JumpIfInventory("Automatic", 1, "Alt.Single")
Alt.Automatic:
SHTG A 0 A_Print("Automatic!")
SHTG A 0 A_GiveInventory("Automatic", 1)
SHTG A 0 A_TakeInventory("Single", 1)
SHTG ABCBABCBABCBA 1
Goto Ready
Alt.Single:
SHTG A 0 A_Print("Single!")
SHTG A 0 A_GiveInventory("Single", 1)
SHTG A 0 A_TakeInventory("Automatic", 1)
SHTG ABCBA 1
Goto Ready
Flash:
SHTG A 0 A_PlaySound("weapons/sshotf", CHAN_WEAPON)
SHTG A 0 A_FireBullets(9, 9, 7, 8)
SHTF A 4 Bright A_Light1
SHTF B 3 Bright A_Light2
Goto LightDone
Spawn:
SHOT A -1
Stop
}
}
Actor Single : Inventory { Inventory.Amount 1 Inventory.MaxAmount 1 }
Actor Automatic : Inventory { Inventory.Amount 1 Inventory.MaxAmount 1 }
actor shotgun-holder : ammo {
inventory.amount 1
inventory.maxamount 8
ammo.backpackamount 1
ammo.backpackmaxamount 8
inventory.icon "shela0" }
// Shells ------------------------------------------------------------------
ACTOR Shell2 : Ammo Replaces Shell
{
SpawnID 12
Inventory.PickupMessage "$GOTSHELLS"
Inventory.Amount 4
Inventory.MaxAmount 50
Ammo.BackpackAmount 4
Ammo.BackpackMaxAmount 100
Inventory.Icon "SBOXA0"
States
{
Spawn:
SHEL A -1
Stop
}
}
// Shell box ------------------------------------------------------------------
ACTOR ShellBox2 : Shell2 Replaces ShellBox
{
SpawnID 143
Inventory.PickupMessage "$GOTSHELLBOX"
Inventory.Amount 20
States
{
Spawn:
SBOX A -1
Stop
}
}