PowerSilencer powerup

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: PowerSilencer powerup

Re: PowerSilencer powerup

by Xtyfe » Thu Mar 19, 2015 11:04 am

Graf Zahl wrote: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.
Geez Graf, Tell us how you really feel :p

Re: PowerSilencer powerup

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

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")""

Re: PowerSilencer powerup

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

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.

Re: PowerSilencer powerup

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

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++. :|

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

by 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")"

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

by 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.

Re: PowerSilencer powerup

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

Because ideally this should be set by the weapon, not the powerup.

Top