actor FlamerFlame
{
  Radius 2
  Height 2
  Renderstyle Add
  Scale 0.3
  Alpha 0.30
  +NOINTERACTION
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    TNT1 A 0 A_Jump (255, "Boom1", "Boom2")
  Boom1:
	EXP1 ABCDEFGHIJKLMNOP 1 bright
	TNT1 A 0 A_Jump(168, 2)
	TNT1 A 0 A_SpawnItemEx("MissileSmoke",0,random(-5,5)*0.1,random(-5,5)*0.1,random(-15,0)*0.1,random(-10,10)*0.1,random(-10,10)*0.1,0,0,64)
	TNT1 A 0
	stop
  Boom2:
	EXP2 ABCDEFGHIJKLMNOP 1 bright
	TNT1 A 0 A_Jump(168, 2)
	TNT1 A 0 A_SpawnItemEx("MissileSmoke",0,random(-5,5)*0.1,random(-5,5)*0.1,random(-15,0)*0.1,random(-10,10)*0.1,random(-10,10)*0.1,0,0,64)
	TNT1 A 0
	stop
  }
}

ACTOR FlamerMissile : FastProjectile
{
  Speed 45
  Radius 13
  Height 13
  Damage 1
  reactiontime 20
  +RIPPER
  +BLOODLESSIMPACT
  +THRUSPECIES
  decal "plasmascorchlower"
  species "Player"
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_SpawnItemEx ("FlamerFlame", random (-2, 2), random (-2, 2), random (-2, 2))
    TNT1 A 0 A_Countdown
    Loop
  Death:
    TNT1 A 4
    Stop
  }
}

actor Incinerator : AliensWeapon replaces BFG9000
{
 weapon.kickback 70
 weapon.selectionorder 600
 weapon.ammotype "FuelTank"
 weapon.ammouse 0
 weapon.ammogive 200
 weapon.slotnumber 7
 +weapon.noalert
 +weapon.noautoaim
 +weapon.noautofire
 tag "M240 Incinerator Unit"
 states
 {
  Spawn:
	FLMP A -1
	loop
  Select:
	FLMT A 0 A_Raise
	FLMT A 1 A_Raise
	loop
  Deselect:
	TNT1 A 0 A_StopSoundEX("SoundSlot7")
	FLMT A 0 A_Lower
	FLMT A 1 A_Lower
	loop
  Ready:
	TNT1 A 0 A_TakeInventory("ClickBool", 1)
	TNT1 A 0 A_StopSoundEX("SoundSlot7")
	TNT1 A 0 A_JumpIfInventory("KickItem", 1, "PreKick")
	TNT1 A 0 A_JumpIfInventory("TrackerToggle", 1, "PreTrack")
	FLMT B 1 A_WeaponReady
	FLMT C 1 A_WeaponReady
	FLMT D 1 A_WeaponReady
	FLMT C 1 A_WeapoNReady
	loop
  Fire:
	FLMT A 0 A_JumpIfInventory("FuelTank",3,1)
    Goto Click
	TNT1 A 0 A_JumpIfInventory("RadarActive", 1, "TrackerLower")
    TNT1 A 0 A_AlertMonsters
	FLMT A 1 A_PlayWeaponSound("Flamer/Fire")
	FLMT B 1 A_PlaySoundEx("Flamer/Loop", "SoundSlot7", 1)
	FLMT C 1
	FLMT D 1
  Hold:
	FLMT A 0 A_JumpIfInventory("FuelTank",3,1)
    Goto Click
	TNT1 A 0 A_TakeInventory("FuelTank", 3)
	TNT1 A 0 A_FireCustomMissile("GunSpark",1.5+random(-5.5,5.5),0,0,6,0,1.5+random(-2.8,2.8))
	TNT1 A 0 A_FireCustomMissile("GunSpark2",1.5+random(-5.5,5.5),0,0,6,0,1.5+random(-2.8,2.8))
	TNT1 AA 0 A_FireCustomMissile("FlamerMissile",frandom(-1.0, 1.0), 0, 0, 0, 1, frandom(-0.5, 0.5))
	FLMT D 1 bright
	FLMT D 1 A_ReFire
	FLMT C 1 A_StopSoundEX("SoundSlot7")
	TNT1 A 0 A_PlaySound("Flamer/End")
	FLMT B 2
	FLMT A 3 
	goto ready
  Click:
	TNT1 A 0 A_JumpIfInventory("ClickBool", 1, "ClickSilent")
	FLMT A 1 A_StopSoundEX("SoundSlot7")
	TNT1 A 0 A_PlaySound("Flamer/End")
	TNT1 A 0 A_GiveInventory("ClickBool")
	goto Ready
  ClickSilent:
	FLMT A 1 A_StopSoundEX("SoundSlot7")
	TNT1 A 0 A_Refire("ClickSilent")
	goto ready
  PreKick:
	FLMT A 1 offset(-8, 40)
	FLMT A 1 offset(-24, 56)
	FLMT A 1 offset(-40, 72)
	FLMT A 1 offset(-50, 88)
	FLMT A 1 offset(-66, 104)
	goto Kick
  PostKick:
	FLMT A 1 offset(-66, 104)
	FLMT A 1 offset(-50, 88)
	FLMT A 1 offset(-40, 72)
	FLMT A 1 offset(-24, 56)
	FLMT A 1 offset(-8, 40)
	goto ready
  PreTrack:
	FLMT A 1 offset(-8, 40)
	FLMT A 1 offset(-24, 56)
	FLMT A 1 offset(-40, 72)
	FLMT A 1 offset(-50, 88)
	FLMT A 1 offset(-66, 104)
	goto TrackRaise
  PostTrack:
	FLMT A 1 offset(-66, 104)
    FLMT A 1 offset(-50, 88)
	FLMT A 1 offset(-40, 72)
	FLMT A 1 offset(-24, 56)
	FLMT A 1 offset(-8, 40)
	goto ready
  }
}