Actor USNTacticalOperative : GenericHumanScum 
    {
	 scale 1.0
  obituary "%o was tricked and killed by the USN Tactical Operative"
  health 340
  radius 15
  height 54
  mass 100
  speed 14
  Species "Arch"
+DONTHARMSPECIES
  painchance 10
  SeeSound "USNSolly2/See"
  PainSound "USNSolly2/pain"
  DeathSound "USNSolly2/Death"
  ActiveSound "USNSolly2/Active"
  dropitem "Chaingun", 4
  Tag "USN Tactical Operative"
  MONSTER
  +FLOORCLIP
  States
       {
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("STFUCheck") == 1, "STFU")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult ("VanJumpCheck") == 1, "VanJump")
	TNT1 A 0 A_SetScale (scaleX+frandom(-0.02, 0.02), scaleY+frandom(-0.08,0.08))
  Spawn2:		
    USPC A 10 A_Look
    loop
  STFU:
     TNT1 A 0
	 TNT1 A 0 ACS_NamedExecute ("STFUUSNSolly2")
	 Goto Spawn+2
  VanJump:
	 TNT1 A 0
	 TNT1 A 0  NODELAY ACS_NamedExecuteAlways ("VanillaHeights")
	Goto Spawn+3	 
  See:
  //  "####" A random(1,4)
    TNT1 A 0 A_Jump (70, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	TNT1 A 0 A_Jump (180, "MissileCheck")
  SeeLoop:
    TNT1 A 0 A_CheckSight ("CheckReload")
    TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	TNT1 A 0 A_Jump (199, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
    USPC AABBCCDD 2 A_Chase
	TNT1 A 0 A_JumpIfCloser (325, "ShortRetreat") 
    loop
  DodgeCheck:
    TNT1 A 0 A_Jump (255, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	Goto MissileCheck
  CheckReload:
    TNT1 A 0 A_Jump (220, "CheckReload2")
 	Goto SeeLoop+1
  CheckReload2:
    TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	Goto SeeLoop+1
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    USPC AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		TNT1 A 0 A_Jump (50, "DodgeRight")
		Goto SeeLoop+1
	DodgeLeftF:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (-8,-3))
	    USPC AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
    DodgeLeftB:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (3,8))
	    USPC AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
	DodgeRight:
	    TNT1 A 0 A_FaceTarget
	    USPC AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
	DodgeRightF:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (-8,-3)) 
	    USPC AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
	DodgeRightB:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (3,8)) 
	    USPC AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1    
	StartRetreat:
	    TNT1 A 0 A_ChangeFlag ("FRIGHTENED", true)
	  RetreatLoop:
	    USPC AABBCCDDAABBCCDDAABBCCDDAABBCCDDAABBCCDDAABBCCDDAABBCCDD 2 A_Chase ("", "")
	   RetreatStop:
	    TNT1 A 0
		TNT1 A 0 A_Changeflag ("FRIGHTENED", false)
	   Goto SeeLoop+1
	 ShortRetreat:
	    TNT1 A 0 A_ChangeFlag ("FRIGHTENED", true)
	    USPC AABBCCDDAABBCCDDAABBCCDD 2 A_Chase ("", "")
	   Goto RetreatStop
  AlphaBravo:
    TNT1 A 0 A_CheckRange (800, "AlphaBravoTactical")
    TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
    USPC E 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "MissileAmbush", CHF_DONTMOVE)
	USPC E 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "MissileAmbush", CHF_DONTMOVE)
	USPC E 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "MissileAmbush", CHF_DONTMOVE)
	TNT1 A 0 A_TakeInventory ("GrenadeCoolDown", 1)
	TNT1 A 0 A_Jump (1, "SeeLoop")
   Loop
  AlphaBravoTactical:
    TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
    USPC I 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "AmbushTactical", CHF_DONTMOVE)
	USPC I 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "AmbushTactical", CHF_DONTMOVE)
	USPC I 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "AmbushTactical", CHF_DONTMOVE)
	TNT1 A 0 A_TakeInventory ("GrenadeCoolDown", 1)
	TNT1 A 0 A_Jump (1, "SeeLoop")
   Loop
  MissileAmbush:
    USPC EE 4 A_FaceTarget	   
  MissileCheck:
    TNT1 A 0 A_JumpIfInventory ("GrenadeCoolDown", 1, 2)
    TNT1 A 0 A_Jump (247, "40mmCheck") 
    TNT1 A 0 A_JumpIfTargetInLos ("Missile", 0, JLOSF_DEADNOJUMP )
	Goto SeeLoop
  Missile:
    TNT1 A 0 A_Changeflag ("FRIGHTENED", false) 
    TNT1 A 0 A_TakeInventory ("GrenadeCoolDown", 1)
    USPC E 8 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLos ("CloseQuarters", 0, JLOSF_DEADNOJUMP, 500)
	TNT1 A 0 A_JumpIfTargetInLos ("LongRange", 0, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1000)
  MissileLoop:
    USPC E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	TNT1 A 0 A_PlaySound ("TACRIFFF", 6, 0.5, 0)
	USPC F 1 BRIGHT A_CustomMissile ("HRTracer",42,7,random (-1,1))
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	TNT1 A 0 A_JumpIfInventory ("ShotCounter", 4, "MissileLoopEvade")
	TNT1 A 0 A_MonsterRefire (1, "AlphaBravo")
   Loop
  MissileLoopEvade:
    TNT1 A 0
	TNT1 A 0 A_TakeInventory ("ShotCounter", 4)
    USPC E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	TNT1 A 0 A_PlaySound ("TACRIFFF", 6, 0.5, 0)
	USPC F 1 BRIGHT A_CustomMissile ("HRTracer",42,7,random (-1,1))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	TNT1 A 0 A_JumpIfInTargetLos ("DodgeCheck", 5, JLOSF_DEADNOJUMP)
	TNT1 A 0 A_MonsterRefire (1, "AlphaBravo")
   Loop 
  CloseQuarters:
    USPC E 4 A_FaceTarget
    TNT1 A 0 A_PlaySound ("TACARFIR")
	TNT1 A 0 A_PlaySound ("TACRIFFF", 6, 0.5, 0)
	USPC F 1 BRIGHT A_CustomMissile ("HRTracer",42,7,random (-10,-8))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC E 1 A_FaceTarget
    TNT1 A 0 A_PlaySound ("TACARFIR")
	TNT1 A 0 A_PlaySound ("TACRIFFF", 6, 0.5, 0)
	USPC F 1 BRIGHT A_CustomMissile ("HRTracer",42,7,random (-6,-3))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC E 1 A_FaceTarget
    TNT1 A 0 A_PlaySound ("TACARFIR")
	TNT1 A 0 A_PlaySound ("TACRIFFF", 6, 0.5, 0)
	USPC F 1 BRIGHT A_CustomMissile ("HRTracer",42,7,random (-2,2))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC E 1 A_FaceTarget
    TNT1 A 0 A_PlaySound ("TACARFIR")
	TNT1 A 0 A_PlaySound ("TACRIFFF", 6, 0.5, 0)
	USPC F 1 BRIGHT A_CustomMissile ("HRTracer",42,7,random (4,6))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC E 1 A_FaceTarget
    TNT1 A 0 A_PlaySound ("TACARFIR")
	TNT1 A 0 A_PlaySound ("TACRIFFF", 6, 0.5, 0)
	USPC F 1 BRIGHT A_CustomMissile ("HRTracer",42,7,random (8,10))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	TNT1 A 0 A_JumpIfInTargetLos ("GranataRetreatCheck", 10, JLOSF_DEADNOJUMP)
   Goto MissileCheck
  LongRange:
    USPC E 7 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	TNT1 A 0 A_PlaySound ("TACRIFFF", 6, 0.5, 0)
	USPC F 1 BRIGHT A_CustomMissile ("HRTracer",42,7)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	TNT1 A 0 A_MonsterRefire (1, "AlphaBravo")
	TNT1 A 0 A_JumpIfInTargetLOs ("ShortRetreat", 3)
   Loop
  AmbushTactical:
    USPC II 4 A_FaceTarget
    TNT1 A 0 A_JumpIfInventory ("GrenadeCoolDown", 1, 2)
    TNT1 A 0 A_Jump (250, "Acc40mmCheck") 
    TNT1 A 0 A_JumpIfTargetInLos ("TactMissile", 0, JLOSF_DEADNOJUMP )
	Goto SeeLoop	
  TactMissile:
    USPC I 8 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOs ("ShortRetreat", 3)
	USPC I 7 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLos ("TacticalCQ", 0, JLOSF_DEADNOJUMP, 550)
	TNT1 A 0 A_JumpIfTargetInLos ("TacticalLR", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 1000)
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-1,1))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-1,1))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-1,1))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	TNT1 A 0 A_MonsterRefire (4, "AmbushTactical")
   Loop
  TacticalCQ:
    TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-1,1))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-3,3))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
   Goto GranataRetreatCheck
  TacticalLR:
    USPC I 10 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8)
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLos ("TacticalRetreat", 8)
	TNT1 A 0 A_MonsterRefire (1, "AlphaBravoTactical")
   Loop
  TacticalRetreat:
    USPC I 3 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-5,-3))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-1,1))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-2,2))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-3,3))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
	USPC I 3 A_FaceTarget
	TNT1 A 0 A_PlaySound ("TACARFIR")
	USPC J 1 BRIGHT A_CustomMissile ("HRTracer",32,8, random (-3,3))
	TNT1 A 0 A_GiveInventory ("AKShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AKShotCounter", 30, "Reload")
   Goto GranataRetreatCheck	
  GranataCheck:
	TNT1 A 0 
    TNT1 A 0 A_JumpIfTargetInLos ("Granata", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 700, 300)
	Goto MissileCheck+2
  Granata:
	TNT1 A 0
	TNT1 A 0 A_Jump (175, 2)
	TNT1 A 0 A_PlaySound ("USNSolly4/Attack", CHAN_VOICE)
    USPC D 12 A_FaceTarget
	TNT1 A 0 A_PlaySound ("GRNTOSS", CHAN_WEAPON)	
	USPC E 8 A_CustomMissile ("GreenHandGrenade", 42, 0, random (-3,3), CMF_OFFSETPITCH, random (12, 17))
	Goto SeeLoop
  GranataRetreatCheck:
	TNT1 A 0 
    TNT1 A 0 A_JumpIfTargetInLos ("GranataRetreat", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 700, 300)
	Goto StartRetreat	
  GranataRetreat:
	TNT1 A 0
	TNT1 A 0 A_Jump (175, 2)
	TNT1 A 0 A_PlaySound ("USNSolly4/Attack", CHAN_VOICE)
    USPC D 9 A_FaceTarget
	TNT1 A 0 A_PlaySound ("GRNTOSS", CHAN_WEAPON)	
	USPC E 8 A_CustomMissile ("GreenHandGrenade", 42, 0, random (-6,6), CMF_OFFSETPITCH, random (12, 17))
	Goto StartRetreat	
  40mmCheck:
	TNT1 A 0
    TNT1 A 0 A_JumpIfTargetInLos ("40mm", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 900, 400)
	TNT1 A 0 A_JumpIfTargetInLos ("Suppress40mm", 15, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 1350, 901)
	TNT1 A 0 A_JumpIfTargetInLos ("Long40mm", 15, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1201)
	Goto MissileCheck+1
  Acc40mmCheck:
	TNT1 A 0
	TNT1 A 0 A_JumpIfTargetInLos ("AccSuppress40mm", 15, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 1350, 901)
	TNT1 A 0 A_JumpIfTargetInLos ("AccLong40mm", 15, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1201)
	Goto MissileCheck+1	
  40mm:
    USPC E 10 A_FaceTarget
	TNT1 A 0 A_PlaySound ("GLFIR", CHAN_WEAPON)
	USPC F 2 BRIGHT A_CustomMissile ("LRGrenade40mm", 42, 8, random (-3,3), CMF_OFFSETPITCH, random (4, 6))
	TNT1 A 0 A_GiveInventory ("GrenadeCoolDown", 2)
	Goto SeeLoop
  Suppress40mm:
	USPC E 12 A_FaceTarget
	TNT1 A 0 A_PlaySound ("GLFIR", CHAN_WEAPON)
	USPC F 3 BRIGHT A_CustomMissile ("LRGrenade40mm", 42, 8, random (-3,3), CMF_OFFSETPITCH, random (6,9))
	TNT1 A 0 A_GiveInventory ("GrenadeCoolDown", 2)
	Goto Seeloop
  Long40mmCheck:
    TNT1 A 0
    TNT1 A 0 A_JumpIfInventory ("GrenadeCoolDown", 1, "SeeLoop")	
  Long40mm:
	USPC E 20 A_FaceTarget
	TNT1 A 0 A_PlaySound ("GLFIR", CHAN_WEAPON)
	USPC F 3 BRIGHT A_CustomMissile ("LRGrenade40mm", 42, 8, random (-3,3), CMF_OFFSETPITCH, random (16,18))
	TNT1 A 0 A_GiveInventory ("GrenadeCoolDown", 2)
	Goto SeeLoop
   AccSuppress40mm:
	USPC I 15 A_FaceTarget
	TNT1 A 0 A_PlaySound ("GLFIR", CHAN_WEAPON)
	USPC J 3 BRIGHT A_CustomMissile ("LRGrenade40mm", 32, 8, random (-1,1), CMF_OFFSETPITCH, random (6,9))
	TNT1 A 0 A_GiveInventory ("GrenadeCoolDown", 2)
	Goto AmbushTactical+6	
  AccLong40mm:
	USPC I 35 A_FaceTarget
	TNT1 A 0 A_PlaySound ("GLFIR", CHAN_WEAPON)
	USPC J 3 BRIGHT A_CustomMissile ("LRGrenade40mm", 32, 8, random (-1,1), CMF_OFFSETPITCH, random (16,18))
	TNT1 A 0 A_GiveInventory ("GrenadeCoolDown", 2)
	Goto AmbushTactical+6	
  Reload:
    USPC D 22 A_Playsound ("TRIFOUT") 
	TNT1 A 0 A_TakeInventory ("AKShotCounter", 30)
	USPC E 20 A_Playsound ("TRIFIN")
	USPC D 8 A_Playsound ("TRIFCOCK")
	Goto SeeLoop
  Pain:
    USPC H 3
    USPC H 3 A_Pain
	TNT1 A 0 A_Changeflag ("FRIGHTENED", false)
	TNT1 A 0 A_Jump (100, "DodgeCheck") 
    goto SeeLoop
  Death:
  	//TNT1 A 0 A_Jump(20, "Suren")
    USPC K 5 A_Scream
    USPC L 5
    USPC M 5 A_NoBlocking
    USPC N 5 A_Playsound ("FallingBodyGear", CHAN_BODY)
    USPC O -1
    stop
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    PGIB A 5
    PGIB B 5 A_XScream
    PGIB C 5 A_NoBlocking
    PGIB D 5
    PGIB E -1
    Stop
  Raise:
    TNT1 A 0 
	TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	USPC ONMLK 5
   Goto See	
  //Suren:
    //RSS1 A 5 A_PlaySound("Baddy/Surren")
    //RSS1 B 5 
    //RSS1 C 5 A_NoBlocking
   // RSS1 C 5 A_SpawnItem("Russ1wimp",0,0)
    //stop
  Idle:
    USPC AA 4 A_Wander
    USPC A 0 A_Look
    USPC BB 4 A_Wander
    USPC A 0 A_Look
    USPC CC 4 A_Wander
    USPC A 0 A_Look
    USPC DD 4 A_Wander
    USPC A 0 A_Look
    loop
  }

}	



