Actor Trite 22068
{
  HitObituary "%o was nipped by a Trite"
  Health 30
  Radius 20
  Height 25
  Mass 100
  Speed 6
  Scale 0.55
  PainChance 192
  BloodColor DarkGreen
  PainSound "Trite/Pain"
  SeeSound "Trite/Sight"
  DeathSound "Trite/Death"
  ActiveSound "Trite/Active"
  MeleeSound "Trite/MeleeHit"
  MeleeDamage 2
  MeleeThreshold 64
  MaxTargetRange 160
  MinMissileChance 10
  Damage 2
  Monster
  +FloorClip
  +DontHurtSpecies
  +NoTarget
  States
  {
  Spawn:
    TRIT A 1 A_Look
    Loop
  See:
    TRIT A 2 A_Chase("", "", 0)
    TRIT A 2 A_Chase
    TRIT A 0 A_PlaySoundEx("Trite/Step", "SoundSlot7", 0)
    TRIT BB 2 A_Chase("Melee", "Missile", 2)
    TRIT B 0 A_PlaySoundEx("Trite/Step", "SoundSlot7", 0)
    TRIT CC 2 A_Chase
    TRIT C 0 A_PlaySoundEx("Trite/Step", "SoundSlot7", 0)
    TRIT DD 2 A_Chase("Melee", "Missile", 2)
    TRIT D 0 A_PlaySoundEx("Trite/Step", "SoundSlot7", 0)
    Loop
  Melee:
    TRIT A 6 A_FaceTarget
    TRIT A 0 A_Jump(192, 2)
    TRIT A 0 A_PlaySound("Trite/Attack")
    TRIT E 6 A_MeleeAttack
    Goto See
  Missile:
    TRIT A 0 A_Jump(128, "See")
    TRIT AAA 3 A_FaceTarget
    TRIT F 0 A_PlaySound("Trite/Attack")
    TRIT F 0 A_SkullAttack
    TRIT F 10 ThrustThingZ(0, 6, 0, 1)
    TRIT E 8 A_Stop
    Goto See
  Web:
    TRIT F 0
    TRIT F 0 A_ChangeFlag("LowGravity", 1)
    TRIT F 0 A_ChangeFlag("NoDamage", 1)
    TRIT F 0 A_ChangeFlag("NoPain", 1)
    TRIT F 0 A_PlaySound("Trite/WebStart")
    TRIT F 1 A_CheckFloor(1)
    Goto Web+5
    TRIT A 0 A_ChangeFlag("NoDamage", 0)
    TRIT A 0 A_ChangeFlag("NoPain", 0)
    TRIT A 0 A_ChangeFlag("LowGravity", 0)
    TRIT A 12 A_PlaySound("Trite/WebEnd")
    Goto Spawn
  Pain:
    TRIT E 3
    TRIT E 3 A_Pain
    Goto See
  Death:
    TRIT G 5 A_Scream
    TRIT H 0 A_PlaySoundEx("Trite/Splat", "SoundSlot7", 0)
    TRIT H 5 A_NoBlocking
    TRIT IJK 5    
    Stop
  }
}

//==========Mapper Notes

//The Web state is activated through the ACS fuction SetActorState
//and is used to lower the Trite to the floor as though it was on a web.
//(Note that this only really helps if it's spawned above the floor.)


//==========Credits
//Decorate: Ghastly_dragon
//Sprites: Monolith, Id Software
//Sprite Edit: Captain Toenail
//Sounds: Id Software
