Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Mengo

Accidental infinite ammo?

Question

So I'm making a wad, and I've been working on it for a while, and all of a sudden I finally realize, the shotguns i put in don't use any ammo at all while the vanilla shotguns still do.

 

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1

you set flags in `A_FireBullets` to zero, so `FBF_USEAMMO` flag is not set. hence, no ammo check/depletion is done.

Share this post


Link to post
  • 0

 

actor M870 : Weapon 7140
{
  Weapon.SelectionOrder 1300
  Weapon.AmmoUse 1
  Weapon.AmmoGive 8
  Weapon.AmmoType "Shell"
  Weapon.SlotNumber 3
  Inventory.PickupMessage "You got an M870"
  Obituary "%o was blown open by %k's shotgun."
  Attacksound "DukeShotgun/Fire"
  Decal "BulletChip"
  States
  {
  Ready:
    DNSG A 1 A_WeaponReady
    Loop
  Deselect:
    DNSG A 1 A_Lower
    Loop
  Select:
    DNSG A 1 A_Raise
    Loop
  Fire:
    DNSG A 3 
	DNSG B 1 A_CustomPunch (30 ,False , 0, "SgPuff" , 64)
    DNSG B 1 A_FireBullets (7, 7, 7, 5, "BulletPuff", 0, 1027)
    DNSG B 0 radius_quake(2, 2, 0, 1, 0)
    DNSG B 0 A_GunFlash
    DNSG CDEDCB 1 bright
    DNSG A 3
    DNSG FGH 1
    DNSG I 2 A_PlaySound ("DukeShotgun/Pump")
    DNSG JKLKJI 2
    DNSG HGF 1
    DNSG A 7 A_ReFire
    Goto Ready
  Flash:
    TNT1 A 4 Bright A_Light1
    TNT1 A 3 Bright A_Light2
    Goto LightDone
  Spawn:
    DNSP A -1
    Stop
  }
}

actor SGPuff : BulletPuff
{
  damagetype ShotgunMelee
  PROJECTILE
  +RANDOMIZE
  states
  {
  Spawn:
    TNT1 A 1
    TNT1 A 1
    goto Death
  Death:
    TNT1 A 1
    stop
  }
}

 

Share this post


Link to post
  • 0
2 hours ago, ketmar said:

you set flags in `A_FireBullets` to zero, so `FBF_USEAMMO` flag is not set. hence, no ammo check/depletion is done.

Yo thanks! I messed that up while trying to add a maximum range to the ammunition so shotgun sniping wasnt a thing and just filled that in with a zero. You're a lifesaver.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×