#  ![](https://www.realm667.com/media/kunena/topic_icons/realm667/user/map.png) 3 round bursts for handgun?

##

- **NourPrince**
- ![NourPrince's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar1675.jpg) Topic Author
- Chaingunner
- ![Chaingunner](https://www.realm667.com/media/kunena/ranks/rank_6_chaingunner.png)

 Less More- Posts: 63
-
-

   10 years 10 months ago - 10 years 8 months ago [\#2836](#2836) by NourPrince  *[3 round bursts for handgun?](https://www.realm667.com/forum/the-workshop/524-3-round-bursts-for-handgun#2836 "I have recently made a handgun that is semi-auto and has 3 round burst when you press altfire.

Heres the decorate:

I have a problem at the alt-fire, if i have limited ammo and the clip almost ran out (the amount of clip is 2 for example) i would make the gun burst 2 rounds instead of 3. so any decorate coding help here? Thanks")* was created by *NourPrince*

 I have recently made a handgun that is semi-auto and has 3 round burst when you press altfire.

Heres the decorate:
Code:

Actor .50Handgun : Weapon { Weapon.SlotNumber 2 Weapon.AmmoType "Clip" Weapon.AmmoUse 1 Weapon.AmmoGive 20 Tag "Bluetail .50 Caliber Handgun" Inventory.Pickupmessage "You've got Bluetail Handgun!" +WEAPON.NOAUTOFIRE +AMMO_OPTIONAL States { Spawn: 2XKP A -1 Stop Select: 2XKG C 1 A_Raise Loop Deselect: 2XKG AB 1 2XKG C 1 A_lower Goto Deselect+2 Ready: 2XKG BA 3 2XKG A 1 A_WeaponReady Goto Ready+2 Fire: 2XKF A 0 A_JumpIfInventory("Clip",1,2) 2XKG A 1 Goto Ready+2 2XKF A 0 A_TakeInventory("Clip",1) 2XKF A 0 A_Playweaponsound("Bluetail/Fire") 2XKF A 0 A_FireBullets (11.2, 0, 1, 5, "BulletPuff") 2XKF BC 1 Bright 2XKG BCBA 2 Goto Ready+2 AltFire: 2XKF A 0 A_JumpIfInventory("Clip",1,2) 2XKG A 1 Goto Ready+2 2XKF A 0 A_JumpIfInventory("Clip",0,15) 2XKF A 0 A_TakeInventory("Clip",1) 2XKF A 0 A_Playweaponsound("Bluetail/Fire") 2XKF A 0 A_FireBullets (11.2, 0, 1, 5, "BulletPuff") 2XKF BC 1 Bright 2XKF A 0 A_JumpIfInventory("Clip",0,10) 2XKF A 0 A_TakeInventory("Clip",1) 2XKF A 0 A_Playweaponsound("Bluetail/Fire") 2XKF A 0 A_FireBullets (11.2, 0, 1, 5, "BulletPuff") 2XKF BC 1 Bright 2XKF A 0 A_JumpIfInventory("Clip",0,5) 2XKF A 0 A_TakeInventory("Clip",1) 2XKF A 0 A_Playweaponsound("Bluetail/Fire") 2XKF A 0 A_FireBullets (11.2, 0, 1, 5, "BulletPuff") 2XKF BC 1 Bright 2XKG BCBA 2 Goto Ready+2 } }

I have a problem at the alt-fire, if i have limited ammo and the clip almost ran out (the amount of clip is 2 for example) i would make the gun burst 2 rounds instead of 3. so any decorate coding help here? Thanks

 Last edit: 10 years 8 months ago by NeuralStunner. Reason: Code tags? Code tags!

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC81MjQtMy1yb3VuZC1idXJzdHMtZm9yLWhhbmRndW4=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **Blue Shadow**
- ![Blue Shadow's Avatar](https://www.realm667.com/media/kunena/core/svg/person.svg)
- Administrator
- ![Administrator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 1131
-
-
-

   10 years 10 months ago [\#2837](#2837) by Blue Shadow  Replied by *Blue Shadow* on topic *[3 round bursts for handgun?](https://www.realm667.com/forum/the-workshop/524-3-round-bursts-for-handgun#2837 "I have recently made a handgun that is semi-auto and has 3 round burst when you press altfire.

Heres the decorate:

I have a problem at the alt-fire, if i have limited ammo and the clip almost ran out (the amount of clip is 2 for example) i would make the gun burst 2 rounds instead of 3. so any decorate coding help here? Thanks")*

 You need some form of ammo check after each bullet fired. Try this: Code:

AltFire: 2XKF A 0 A_JumpIfInventory("Clip", 1, 2) 2XKG A 1 Goto Ready+2 2XKF A 0 A_Playweaponsound("Bluetail/Fire") 2XKF A 0 A_FireBullets(11.2, 0, 1, 5, "BulletPuff") 2XKF BC 1 Bright 2XKF A 0 A_JumpIfInventory("Clip", 1, 1) Goto AltFireEnd 2XKF A 0 A_Playweaponsound("Bluetail/Fire") 2XKF A 0 A_FireBullets (11.2, 0, 1, 5, "BulletPuff") 2XKF BC 1 Bright 2XKF A 0 A_JumpIfInventory("Clip", 1, 1) Goto AltFireEnd 2XKF A 0 A_Playweaponsound("Bluetail/Fire") 2XKF A 0 A_FireBullets (11.2, 0, 1, 5, "BulletPuff") 2XKF BC 1 Bright AltFireEnd: 2XKG BCBA 2 Goto Ready+2

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC81MjQtMy1yb3VuZC1idXJzdHMtZm9yLWhhbmRndW4=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **NourPrince**
- ![NourPrince's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar1675.jpg) Topic Author
- Chaingunner
- ![Chaingunner](https://www.realm667.com/media/kunena/ranks/rank_6_chaingunner.png)

 Less More- Posts: 63
-
-

   10 years 10 months ago [\#2839](#2839) by NourPrince  Replied by *NourPrince* on topic *[3 round bursts for handgun?](https://www.realm667.com/forum/the-workshop/524-3-round-bursts-for-handgun#2839 "I have recently made a handgun that is semi-auto and has 3 round burst when you press altfire.

Heres the decorate:

I have a problem at the alt-fire, if i have limited ammo and the clip almost ran out (the amount of clip is 2 for example) i would make the gun burst 2 rounds instead of 3. so any decorate coding help here? Thanks")*

 Thank you so much!

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC81MjQtMy1yb3VuZC1idXJzdHMtZm9yLWhhbmRndW4=&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

[Powered by](https://www.realm667.com/forum/credits) [Kunena Forum](https://www.kunena.org)
