PowerSilencer powerup

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Re: PowerSilencer powerup

Post by Xaser »

If we're going to build in volume lowering, why not use Powerup.Strength to control the volume? That's the best suggestion I've heard so far -- means you can control it fully or even disable it if need be.

Hardcoding it to 10% is still problematic. Why hard-code it? The Powerup.Strength route lets every bit be customizable as desired.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PowerSilencer powerup

Post by Graf Zahl »

Because ideally this should be set by the weapon, not the powerup.
User avatar
Snarboo
Posts: 2599
Joined: Tue Nov 29, 2005 4:37 am

Re: PowerSilencer powerup

Post by Snarboo »

So a "Weapon.SilencedVolume" property or the like? Might be good to let each weapon define it's own silenced sound, too.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space

Re: PowerSilencer powerup

Post by NeuralStunner »

I'd still recommend using Powerup.Strength for a default in case of weapons not specifying one. It's a great property that can replace a lot of hardcoded behaviors, I'd love to see it used more.
User avatar
Onar4241
Posts: 296
Joined: Sun Aug 03, 2014 9:41 am
Location: New York

Re: PowerSilencer powerup

Post by Onar4241 »

What about:

The weapon has the "WEAPON.NOALERT" flag, and in the states, you add this:

"TNT1 A 0 A_JumpIfInventory("SilencerPowerUp", 1, "SilencedFire")"
User avatar
Snarboo
Posts: 2599
Joined: Tue Nov 29, 2005 4:37 am

Re: PowerSilencer powerup

Post by Snarboo »

The point of this powerup is to simulate the Silencer from Quake 2, which universally silenced all weapons regardless of whether they were silent to begin with.
User avatar
22alpha22
Posts: 306
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: PowerSilencer powerup

Post by 22alpha22 »

Bumping this to see if any progress has been made or if its been completely forgotten. I've been at the point in my Quake II project where I'm ready to start polishing my weapon code and adding a few improvements but can't yet because I still don't have a solution to the silencer problem. If you guys don't have time to work on this or don't feel like it would add enough to ZDoom/GZDoom to be worth the effort, please let me know so I can begin searching for other alternatives or scrap the silencer from my project altogether. I don't mean to be sound rude, I understand people have busy lives, my own can get hectic at times, its just that its been several months and I need to know what the status is on this so I know how to move forward on my project.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PowerSilencer powerup

Post by Graf Zahl »

Well, this happens if the feature suggestions forum is persistently ignored by the lead developer. Stuff gets added and ignored and eventually forgotten. It has been like this for the 10 years this forum has been present.
User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: PowerSilencer powerup

Post by Major Cooke »

Or if someone else steps up to the plate and codes it themselves, like I did with many a feature idea I had in my head. Simply put, I got fed up with seeing my ideas ignored so I struck out and made them myself. Most of them got in. As for others? Meh. Oh well. Was worth a shot.
User avatar
22alpha22
Posts: 306
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: PowerSilencer powerup

Post by 22alpha22 »

Major Cooke wrote:Or if someone else steps up to the plate and codes it themselves, like I did with many a feature idea I had in my head. Simply put, I got fed up with seeing my ideas ignored so I struck out and made them myself. Most of them got in. As for others? Meh. Oh well. Was worth a shot.
If I knew how to code it myself, I would just create my own fork for my project, theres a lot I would add, change, or tweak for my project if I knew how. However I'm currently learning Python right now and don't have the time to try learning a variant of C which I assume ZDoom is programmed in. Time is sadly something not many people have in abundance these days, myself included.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: PowerSilencer powerup

Post by Arctangent »

If this is really keeping you from making advances, you could just make a dummy power up that does nothing when activated, then slap +WEAPON.NOALERT on every weapon and instead use A_JumpIfInventory to check if the player has the dummy power up. If so, go to a fire state with reduced sound; if not, go to the normal fire state with the regular sound and A_AlertMonsters.
User avatar
22alpha22
Posts: 306
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: PowerSilencer powerup

Post by 22alpha22 »

Arctangent wrote:If this is really keeping you from making advances, you could just make a dummy power up that does nothing when activated, then slap +WEAPON.NOALERT on every weapon and instead use A_JumpIfInventory to check if the player has the dummy power up. If so, go to a fire state with reduced sound; if not, go to the normal fire state with the regular sound and A_AlertMonsters.
Already been through this.
Enjay wrote:I hope there is a better way to do this but the following might work:

Have all relevant weapons have the +NOALERT flag.
In the firing state sequence, have an inventory check that jumps past the next frame if true.
The next frame would call A_AlertMonsters.
The powerup would give the item that causes the inventory check to jump past the call to A_AlertMonsters.
22alpha22 wrote:That is exactly the workaround I used for the other weapons.
Spoiler:
Unfortunately, I don't see how this will work with weapons with complex "HOLD" firing states like the chaingun.
Spoiler:
EDIT:
I've just completed a hacky and messy ACS implementation of the silencer for the machinegun by duplicating the machinegun with a silenced version and using ACS to switch to it when the silencer is active.
Spoiler:
Unless anyone knows of a better way to do this, I'm gonna do this for the chaingun and hyperblaster as well.
I'm already using this as a shortstop measure for most of the weapons but it will not work with the weapons with complex HOLD firing states.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: PowerSilencer powerup

Post by Arctangent »

Code: Select all

Actor AlphaChaingun : Weapon 20003
{
   //$Category Weapons
   //$Sprite HCHGA0
   Game Doom
   SpawnID 4
   Tag "Chaingun"
   Radius 16
   Height 36
   Inventory.Icon "HCHGA0"
   Inventory.PickupMessage "Chaingun"
   Inventory.PickupSound "Weapons/Pickup"
   Weapon.AmmoGive 50
   Weapon.AmmoType "AlphaBullet"
   Weapon.AmmoUse 1
   Weapon.SelectionOrder 7
   Weapon.SlotNumber 4
   Weapon.SlotPriority 0
   Weapon.SisterWeapon "AlphaChaingunQuadDamage"
   Obituary "%o was cut in half by %k's chaingun"
   +DONTBOB
   +NOAUTOAIM
   +ALWAYSPICKUP
   +WEAPON.NOALERT
   States
   {
   Spawn:
      PCHG A -1
      Loop
   Select:
      TNT1 A 0 A_GiveInventory("AlphaChaingunInventory",1)
      TNT1 A 0 A_Raise
      Goto Select+1
   Deselect:
      WCHG H 0 A_JumpIfNoAmmo("Dry")
      WCHG EFG 4
      TNT1 A 0 A_Lower
      Goto Deselect+4
   Ready:
      WCHG ABCD 4
      WCHG H 10 A_WeaponReady
      WCHG H 0 A_Jump(125,"Idle")
      Goto Ready+4
   Fire:
      WCHG H 0 A_GunFlash("FireBullets",GFF_NOEXTCHANGE)
      WCHG I 4 Bright
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright A_ReFire
      WCHG H 8
      Goto Ready+4
   FireBullets:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "FireBulletsSilent")
	  TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_PlaySound("Chaingun/Spinup",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   FireBulletsSilent:
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_PlaySound("Chaingun/Spinup",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Hold:
      WCHG H 0 A_GunFlash("HoldBullets",GFF_NOEXTCHANGE)
      WCHG I 4 Bright
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright
      WCHG R 4 Bright
      WCHG S 4 Bright A_ReFire
      WCHG H 0 A_GunFlash("Spindown",GFF_NOEXTCHANGE)
      WCHG I 4 Bright A_PlaySound("Chaingun/Spindown",5)
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright
      WCHG H 8 A_ClearReFire
      Goto Ready+4
   HoldBullets:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "HoldBulletsSilent")
	  TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_PlaySound("Chaingun/Spin",5,1.0,TRUE)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   HoldBulletsSilent:
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_PlaySound("Chaingun/Spin",5,1.0,TRUE)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Spindown:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "SpindownSilent")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_JumpIfNoAmmo("Spindown")
      TNT1 A 0 A_PlaySound("Chaingun/Spindown",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   SpindownSilent:
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_JumpIfNoAmmo("Spindown")
      TNT1 A 0 A_PlaySound("Chaingun/Spindown",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Dry:
      TNT1 A 0 A_StopSound(5)
      TNT1 A 0 A_PlayWeaponSound("Weapons/Dry")
      Goto Deselect+1
   Idle:
      ICHG ABCDEF 4 A_WeaponReady
      ICHG G 20 A_WeaponReady
      ICHG G 0 A_Jump(200,8)
      ICHG GFEDCBA 4 A_WeaponReady
      Goto Ready+5
      ICHG G 4 A_WeaponReady
      ICHG G 0 A_Jump(125,1)
      ICHG G 105 A_WeaponReady
      ICHG GHIJKL 4 A_WeaponReady
      ICHG L 20 A_WeaponReady
      ICHG L 0 A_Jump(200,13)
      ICHG LKJIHGFEDCBA 4 A_WeaponReady
      Goto Ready+5
      ICHG L 4 A_WeaponReady
      ICHG L 0 A_Jump(125,1)
      ICHG L 70 A_WeaponReady
      ICHG LMNOPQRSTUVWXYZ 4 A_WeaponReady
      IICG ABCD 4 A_WeaponReady
      ICHG D 70 A_WeaponReady
      Goto Ready+4
   }
}
Only a couple minutes in Notepad++. :|
User avatar
22alpha22
Posts: 306
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: PowerSilencer powerup

Post by 22alpha22 »

Arctangent wrote:

Code: Select all

Actor AlphaChaingun : Weapon 20003
{
   //$Category Weapons
   //$Sprite HCHGA0
   Game Doom
   SpawnID 4
   Tag "Chaingun"
   Radius 16
   Height 36
   Inventory.Icon "HCHGA0"
   Inventory.PickupMessage "Chaingun"
   Inventory.PickupSound "Weapons/Pickup"
   Weapon.AmmoGive 50
   Weapon.AmmoType "AlphaBullet"
   Weapon.AmmoUse 1
   Weapon.SelectionOrder 7
   Weapon.SlotNumber 4
   Weapon.SlotPriority 0
   Weapon.SisterWeapon "AlphaChaingunQuadDamage"
   Obituary "%o was cut in half by %k's chaingun"
   +DONTBOB
   +NOAUTOAIM
   +ALWAYSPICKUP
   +WEAPON.NOALERT
   States
   {
   Spawn:
      PCHG A -1
      Loop
   Select:
      TNT1 A 0 A_GiveInventory("AlphaChaingunInventory",1)
      TNT1 A 0 A_Raise
      Goto Select+1
   Deselect:
      WCHG H 0 A_JumpIfNoAmmo("Dry")
      WCHG EFG 4
      TNT1 A 0 A_Lower
      Goto Deselect+4
   Ready:
      WCHG ABCD 4
      WCHG H 10 A_WeaponReady
      WCHG H 0 A_Jump(125,"Idle")
      Goto Ready+4
   Fire:
      WCHG H 0 A_GunFlash("FireBullets",GFF_NOEXTCHANGE)
      WCHG I 4 Bright
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright A_ReFire
      WCHG H 8
      Goto Ready+4
   FireBullets:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "FireBulletsSilent")
	  TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_PlaySound("Chaingun/Spinup",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   FireBulletsSilent:
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_PlaySound("Chaingun/Spinup",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Hold:
      WCHG H 0 A_GunFlash("HoldBullets",GFF_NOEXTCHANGE)
      WCHG I 4 Bright
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright
      WCHG R 4 Bright
      WCHG S 4 Bright A_ReFire
      WCHG H 0 A_GunFlash("Spindown",GFF_NOEXTCHANGE)
      WCHG I 4 Bright A_PlaySound("Chaingun/Spindown",5)
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright
      WCHG H 8 A_ClearReFire
      Goto Ready+4
   HoldBullets:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "HoldBulletsSilent")
	  TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_PlaySound("Chaingun/Spin",5,1.0,TRUE)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   HoldBulletsSilent:
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_PlaySound("Chaingun/Spin",5,1.0,TRUE)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Spindown:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "SpindownSilent")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_JumpIfNoAmmo("Spindown")
      TNT1 A 0 A_PlaySound("Chaingun/Spindown",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   SpindownSilent:
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_JumpIfNoAmmo("Spindown")
      TNT1 A 0 A_PlaySound("Chaingun/Spindown",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Dry:
      TNT1 A 0 A_StopSound(5)
      TNT1 A 0 A_PlayWeaponSound("Weapons/Dry")
      Goto Deselect+1
   Idle:
      ICHG ABCDEF 4 A_WeaponReady
      ICHG G 20 A_WeaponReady
      ICHG G 0 A_Jump(200,8)
      ICHG GFEDCBA 4 A_WeaponReady
      Goto Ready+5
      ICHG G 4 A_WeaponReady
      ICHG G 0 A_Jump(125,1)
      ICHG G 105 A_WeaponReady
      ICHG GHIJKL 4 A_WeaponReady
      ICHG L 20 A_WeaponReady
      ICHG L 0 A_Jump(200,13)
      ICHG LKJIHGFEDCBA 4 A_WeaponReady
      Goto Ready+5
      ICHG L 4 A_WeaponReady
      ICHG L 0 A_Jump(125,1)
      ICHG L 70 A_WeaponReady
      ICHG LMNOPQRSTUVWXYZ 4 A_WeaponReady
      IICG ABCD 4 A_WeaponReady
      ICHG D 70 A_WeaponReady
      Goto Ready+4
   }
}
Only a couple minutes in Notepad++. :|
I tweaked you're example a bit, in yours the silencer was infinite while it should only get about 30 shots, but nonetheless it works. :D I didn't think performing state jumps from a FLASH state would work properly, thats why I never tried it. I'll apply this silencer effect to the machinegun and hyperblaster too, then all my weapons will have working silencer effects. I still hope a proper Silencer powerup or additional PowerWeaponLevel2 is added, so I can implement the silencer in a more clean way, but its no longer urgent; and if no such powerup is ever added, well this will suffice.
User avatar
Onar4241
Posts: 296
Joined: Sun Aug 03, 2014 9:41 am
Location: New York

Re: PowerSilencer powerup

Post by Onar4241 »

Arctangent wrote:

Code: Select all

Actor AlphaChaingun : Weapon 20003
{
   //$Category Weapons
   //$Sprite HCHGA0
   Game Doom
   SpawnID 4
   Tag "Chaingun"
   Radius 16
   Height 36
   Inventory.Icon "HCHGA0"
   Inventory.PickupMessage "Chaingun"
   Inventory.PickupSound "Weapons/Pickup"
   Weapon.AmmoGive 50
   Weapon.AmmoType "AlphaBullet"
   Weapon.AmmoUse 1
   Weapon.SelectionOrder 7
   Weapon.SlotNumber 4
   Weapon.SlotPriority 0
   Weapon.SisterWeapon "AlphaChaingunQuadDamage"
   Obituary "%o was cut in half by %k's chaingun"
   +DONTBOB
   +NOAUTOAIM
   +ALWAYSPICKUP
   +WEAPON.NOALERT
   States
   {
   Spawn:
      PCHG A -1
      Loop
   Select:
      TNT1 A 0 A_GiveInventory("AlphaChaingunInventory",1)
      TNT1 A 0 A_Raise
      Goto Select+1
   Deselect:
      WCHG H 0 A_JumpIfNoAmmo("Dry")
      WCHG EFG 4
      TNT1 A 0 A_Lower
      Goto Deselect+4
   Ready:
      WCHG ABCD 4
      WCHG H 10 A_WeaponReady
      WCHG H 0 A_Jump(125,"Idle")
      Goto Ready+4
   Fire:
      WCHG H 0 A_GunFlash("FireBullets",GFF_NOEXTCHANGE)
      WCHG I 4 Bright
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright A_ReFire
      WCHG H 8
      Goto Ready+4
   FireBullets:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "FireBulletsSilent")
	  TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_PlaySound("Chaingun/Spinup",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   FireBulletsSilent:
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_PlaySound("Chaingun/Spinup",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Hold:
      WCHG H 0 A_GunFlash("HoldBullets",GFF_NOEXTCHANGE)
      WCHG I 4 Bright
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright
      WCHG R 4 Bright
      WCHG S 4 Bright A_ReFire
      WCHG H 0 A_GunFlash("Spindown",GFF_NOEXTCHANGE)
      WCHG I 4 Bright A_PlaySound("Chaingun/Spindown",5)
      WCHG J 4 Bright
      WCHG K 4 Bright
      WCHG L 4 Bright
      WCHG M 4 Bright
      WCHG N 4 Bright
      WCHG O 4 Bright
      WCHG P 4 Bright
      WCHG Q 4 Bright
      WCHG H 8 A_ClearReFire
      Goto Ready+4
   HoldBullets:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "HoldBulletsSilent")
	  TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_PlaySound("Chaingun/Spin",5,1.0,TRUE)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   HoldBulletsSilent:
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_PlaySound("Chaingun/Spin",5,1.0,TRUE)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(3,3,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 2 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Spindown:
	  TNT1 A 0 A_JumpIfInventory("PowerSilencer", 1, "SpindownSilent")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_JumpIfNoAmmo("Spindown")
      TNT1 A 0 A_PlaySound("Chaingun/Spindown",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlayWeaponSound("Machinegun/Fire")
      Stop
   SpindownSilent:
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_JumpIfNoAmmo("Spindown")
      TNT1 A 0 A_PlaySound("Chaingun/Spindown",5)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      TNT1 A 0 A_FireBullets(2,2,-1,8,"AlphaBulletPuff",FBF_USEAMMO|FBF_NOFLASH|FBF_NORANDOM)
      TNT1 A 4 A_PlaySound("Machinegun/Fire", CHAN_WEAPON, 0.2)
      Stop
   Dry:
      TNT1 A 0 A_StopSound(5)
      TNT1 A 0 A_PlayWeaponSound("Weapons/Dry")
      Goto Deselect+1
   Idle:
      ICHG ABCDEF 4 A_WeaponReady
      ICHG G 20 A_WeaponReady
      ICHG G 0 A_Jump(200,8)
      ICHG GFEDCBA 4 A_WeaponReady
      Goto Ready+5
      ICHG G 4 A_WeaponReady
      ICHG G 0 A_Jump(125,1)
      ICHG G 105 A_WeaponReady
      ICHG GHIJKL 4 A_WeaponReady
      ICHG L 20 A_WeaponReady
      ICHG L 0 A_Jump(200,13)
      ICHG LKJIHGFEDCBA 4 A_WeaponReady
      Goto Ready+5
      ICHG L 4 A_WeaponReady
      ICHG L 0 A_Jump(125,1)
      ICHG L 70 A_WeaponReady
      ICHG LMNOPQRSTUVWXYZ 4 A_WeaponReady
      IICG ABCD 4 A_WeaponReady
      ICHG D 70 A_WeaponReady
      Goto Ready+4
   }
}
Only a couple minutes in Notepad++. :|
I said the same thing:

"What about:

The weapon has the "WEAPON.NOALERT" flag, and in the states, you add this:

"TNT1 A 0 A_JumpIfInventory("SilencerPowerUp", 1, "SilencedFire")""

Return to “Feature Suggestions [GZDoom]”