D2Jk Posted March 10, 2013 Hi all, I'm trying to add a secondary fire to railgun, which consumes less ammo but doesn't pierce. The problem is, I can't get the alt-fire to actually consume ammo, for some reason. Here's the code I'm using: ACTOR Railgunx : Weapon 1234 { Weapon.AmmoType1 "Cell" Weapon.AmmoUse 10 Weapon.SlotNumber 9 States { Ready: RAIL A 8 A_WeaponReady Loop Deselect: RAIL A 0 A_Lower Loop Select: RAIL A 0 A_Raise Loop Fire: RAIL A 0 A_Light2 RAIL B 3 Bright A_RailAttack(225,0,1,NONE,"EE EE EE",8) RAIL CD 3 Bright A_Light1 RAIL E 3 A_Light0 RAIL F 10 RAIL F 0 A_CheckReload RAIL F 50 A_PlaySound("weapons/railcharge") RAIL F 0 A_Refire goto Ready AltFire: RAIL A 0 A_Light2 RAIL B 3 Bright A_RailAttack(225,0,1,NONE,"00 00 FF",10) RAIL B 0 A_PlaySound("weapons/railcharge") RAIL CD 3 Bright A_Light1 RAIL E 3 A_Light0 RAIL F 0 A_CheckReload RAIL F 40 RAIL F 0 A_Refire goto Ready }} As you can see, the "use ammo" boolean is properly set to "1". Why doesn't it work? Another thing I'm wondering is that I don't see a setting which controls the ammo usage of the secondary fire. Would it be possible to work around this by making the weapon consume "1" ammo, and then making it shoot several weak beams simultaneously? The player shouldn't actually see multiple beams in that case, just a single one, but increased number of particles would be ok. 0 Share this post Link to post
Blue Shadow Posted March 10, 2013 Give it Weapon.AmmoUse2 and Weapon.AmmoType2 properties. These are for secondary attack. 0 Share this post Link to post
D2Jk Posted March 10, 2013 Thank you, that did it. :) I was aware of those weapon properties, but I was assuming they were meant only for weapons using multiple ammo types. 0 Share this post Link to post