PowerSilencer powerup

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

Moderator: GZDoom Developers

Re: PowerSilencer powerup

Postby Xaser » Tue Nov 25, 2014 2:32 pm

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
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: PowerSilencer powerup

Postby Graf Zahl » Tue Nov 25, 2014 3:22 pm

Because ideally this should be set by the weapon, not the powerup.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: PowerSilencer powerup

Postby Snarboo » Tue Nov 25, 2014 3:43 pm

So a "Weapon.SilencedVolume" property or the like? Might be good to let each weapon define it's own silenced sound, too.
User avatar
Snarboo
Bacon doesn't know it's not dogs
 
Joined: 29 Nov 2005

Re: PowerSilencer powerup

Postby NeuralStunner » Tue Nov 25, 2014 3:46 pm

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
NeuralStunner
Not "Neutral"
 
 
 
Joined: 21 Jul 2009
Location: capital N, capital S, no space
Discord: NeuralStunner#4201
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: PowerSilencer powerup

Postby Onar4241 » Thu Nov 27, 2014 6:54 am

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
Onar4241
I'm just a guy...
 
Joined: 03 Aug 2014
Location: New York

Re: PowerSilencer powerup

Postby Snarboo » Thu Nov 27, 2014 11:41 am

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
Snarboo
Bacon doesn't know it's not dogs
 
Joined: 29 Nov 2005

Re: PowerSilencer powerup

Postby 22alpha22 » Mon Mar 16, 2015 1:05 am

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
22alpha22
So lonely...
 
Joined: 21 Feb 2014
Location: Montana, USA
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: PowerSilencer powerup

Postby Graf Zahl » Mon Mar 16, 2015 2:24 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: PowerSilencer powerup

Postby Major Cooke » Mon Mar 16, 2015 7:09 am

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
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: PowerSilencer powerup

Postby 22alpha22 » Mon Mar 16, 2015 2:06 pm

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
22alpha22
So lonely...
 
Joined: 21 Feb 2014
Location: Montana, USA
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: PowerSilencer powerup

Postby Arctangent » Mon Mar 16, 2015 3:25 pm

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
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371

Re: PowerSilencer powerup

Postby 22alpha22 » Mon Mar 16, 2015 3:54 pm

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
22alpha22
So lonely...
 
Joined: 21 Feb 2014
Location: Montana, USA
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: PowerSilencer powerup

Postby Arctangent » Mon Mar 16, 2015 4:49 pm

Code: Select allExpand view
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
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371

Re: PowerSilencer powerup

Postby 22alpha22 » Mon Mar 16, 2015 6:53 pm

Arctangent wrote:
Code: Select allExpand view
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
22alpha22
So lonely...
 
Joined: 21 Feb 2014
Location: Montana, USA
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: PowerSilencer powerup

Postby Onar4241 » Tue Mar 17, 2015 9:11 am

Arctangent wrote:
Code: Select allExpand view
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")""
User avatar
Onar4241
I'm just a guy...
 
Joined: 03 Aug 2014
Location: New York

PreviousNext

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest