Jump to content
  • 0

Accidental infinite ammo?


Mengo

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...