0 Members and 1 Guest are viewing this topic.
However, I don't know about you but absolutely hate mashing my mouse button.
Every weaponactor RollingCutterWep : MegaBuster 10056...Weapon.AmmoUse 4weapon.ammotype "RollingCutterAmmo"...Fire:->actor RollingCutterWep : MegaBuster 10056...Weapon.AmmoUse 4weapon.ammotype "RollingCutterAmmo"weapon.ammotype2 "RollingCutterAmmo"Weapon.AmmoUse2 4...Altfire:Fire:
TNT1 A 0 A_Refire->TNT1 A 0 A_JumpIfInventory("TurboToggle",1,2)TNT1 A 0 A_RefireTNT1 A 0
But I'm guessing your current methodology is this, which would cause quite a bit of code bloat
Altfire:Fire:...
WeaponA...AltFire:Fire:A_Log("A")...WeaponB : WeaponA...Fire:A_Log("B")...Altfire with WeaponB results in "A"
WeaponA...AltFire:TNT1 A 1 A_Jump(256,"Fire")wait...WeaponB : WeaponA...Fire:A_Log("B")...Altfire with WeaponB results in "B"
If one was willing to wait for version 3.0 to make this change, simply employing the following flags on the base weapon would suffice:+WEAPON.ALT_USES_BOTH - Altfire now makes use of Ammo1 and the defined Ammo2 [if any]+WEAPON.ALT_AMMO_OPTIONAL - Ammo is no longer required to enter the Altfire state.
actor baseweapon...+WEAPON.ALT_USES_BOTH+WEAPON.ALT_AMMO_OPTIONAL...AltFire:TNT1 A 1 A_Jump(256,"Fire")wait
AltFire:TNT1 A 1 A_JumpIfInventory("BusterAmmo",1,"Fire")wait
We will even make it so non-charge weapons fire their regular shot when pressing altfire so the button isn't completely dead when switching weapons.
weapon.ammotype2 "ammo"weapon.ammouse2 ammouse