DiR Posted August 22, 2017 So, I'm making a shotgun-type weapon that has a more powerful altfire, but at the cost of more ammo. What I want to do is during the normal firing animation, it only uses 1 shell per shot, but when it uses it's altfire, there's kickback and it uses 4 shells per shot. How would I go about doing this? 0 Share this post Link to post
0 scifista42 Posted August 22, 2017 https://zdoom.org/wiki/Actor_properties#Weapon.AmmoUse2 0 Share this post Link to post
0 Voros Posted August 22, 2017 DECORATE supports alternate firing modes. A rough example below: ACTOR MyGun : Shotgun Decal BulletChip Inventory.PickupMessage "The overpowered, invisible, and silent Shotgun!" Weapon.SlotNumber 3 Weapon.SelectionOrder 2000 Weapon.AmmoType "Shell" Weapon.AmmoType2 "Shell" Weapon.AmmoGive 20 Weapon.AmmoGive2 20 Weapon.AmmoUse 1 Weapon.AmmoUse2 4 //deduct 4 shells from ammo counter, if altfire is used States { Select: TNT1 A 1 A_Raise Loop Deselect: TNT1 A 1 A_Lower Loop Ready: TNT1 A 1 A_WeaponReady Loop Fire: TNT1 A 1 A_FireBullets(2, 2, 7, 10) TNT1 A 1 A_ReFire Goto Ready //this is the secondary fire, usually activated by right-mouse click. AltFire: TNT1 A 1 A_FireBullets(4, 4, 14, 20) TNT1 A 1 A_ReFire Goto Ready } } Weapon.AmmoUse2 is a weapon property that defines how much ammo should be deducted. In this, case, 4 shells will be removed. The AltFire state is the alternate firing state. Here the damage produced is even greater and more "shells" are shot (14 to be exact). 0 Share this post Link to post
0 DiR Posted August 22, 2017 Thanks! It's quite an ambitious first weapon mod, but I got it done thanks to your help! 0 Share this post Link to post
So, I'm making a shotgun-type weapon that has a more powerful altfire, but at the cost of more ammo.
What I want to do is during the normal firing animation, it only uses 1 shell per shot,
but when it uses it's altfire, there's kickback and it uses 4 shells per shot.
How would I go about doing this?
Share this post
Link to post