Neon Posted March 16, 2009 To build my wad I am using Doombuilder, Zdoom(Doom in hexen format). Using XWE and DECORATE to make my weapons. My weapon's altfire takes 100 rockets to fire so after firing there's always 0 altfire ammo left. Problem is: after altfiring the weapon, it lowers and raises (like it's going to switch to a different weapon, but it doesn't actually switch weapons) even if it still has enough primary ammo for primary fire. Is it possible to make the weapon not lower and raise when it runs out of altfire ammo? If that's not possible, I would be happy if I could get the weapon to never switch, regardless of whether there is any primary or altfire ammo left. Any help would be appreciated, this problem is quite annoying! 0 Share this post Link to post
Steeveeo Posted March 16, 2009 Post your DECORATE entry for it, I have not run into this before. 0 Share this post Link to post
Neon Posted March 16, 2009 ACTOR HeavyRifle : Weapon 25035 { Inventory.PickupMessage "You got the Heavy Rifle!" Inventory.PickupSound "misc/w_pkup" Weapon.AmmoType1 "Shell" Weapon.AmmoGive1 16 Weapon.AmmoUse1 2 Weapon.AmmoType2 "RocketAmmo" Weapon.AmmoGive2 100 Weapon.AmmoUse2 100 Weapon.kickback 400 +BLOODSPLATTER States { Spawn: HVYR A -1 Loop Ready: HVRG A 1 A_WeaponReady Loop Deselect: HVRG A 1 A_Lower Loop Select: HVRG A 0 A_PlaySound("weapons/rifleup") HVRG A 1 A_Raise Goto Select+1 Fire: HVRG A 0 A_PlaySound("weapons/riflefre") HVRF A 5 Bright A_FireBullets (0, 0, 3, 11, "bulletpuff", 1, 10000) HVRG A 10 HVRG A 0 A_Refire Goto Ready AltFire: HVRG A 0 A_PlaySound("weapons/monspwnf") HVRF A 2 Bright A_FireBullets(18,7,60,4, "bulletpuff", 1, 10000) HVRG A 0 A_Refire Goto Ready } } ACTOR HeavyBullet { Speed 200 Damage 0 Radius 6 Height 8 PROJECTILE SeeSound "weapons/riflefre" RENDERSTYLE ADD ALPHA 1.0 States { Spawn: BULL A 1 Bright Loop Death: GRNE BCDEFGHIJKLMN 2 Bright A_Explode (175, 175) NULL A 0 A_PlaySound ("weapons/grenexpl") stop } } 0 Share this post Link to post
wildweasel Posted March 16, 2009 What's happening here is that the weapon is out of ammo for the altfire, so it switches away to the next weapon that has enough primary ammo, which in this case would be the same weapon it just switched away from. I don't recall off-hand what my solution was for this (if I ever came up with one) but I would do a little experimentation with the Weapon.SelectionOrder. 0 Share this post Link to post
wooze Posted March 20, 2009 You could try the +AMMO_OPTIONAL flag, however, it won't switch to another weapon if you really run out of ammo you will have to manually switch. 0 Share this post Link to post