Classes:Templar

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
  1. This actor is already defined in GZDoom, there's no reason to define it again.
  2. In fact, trying to define an actor with the same name will cause an error (because it already exists).
  3. If you want to make your own version of this actor, use inheritance.
  4. Definitions for existing actors are put on the wiki for reference purpose only.
Templar
Actor type Monster Game MiniStrifeLogoIcon.png (Strife)
DoomEd Number 3003 Class Name Templar
Conversation ID 62, 61, 62 Puzzle Item ID N/A


Classes: ActorTemplar
Templars are Strife enemies. Like Acolytes, they do not attack unless the alarm is active, and you can talk to them while they are idle. They attack by firing a Mauler blast, however this is weaker than the player's weapon. Despite their Mauler being most effective at close ranges, they have a mêlée attack.

DECORATE definition

ACTOR Templar
{
  Health 300
  PainChance 100
  Speed 8
  Radius 20
  Height 60
  Mass 500
  Monster
  +NOBLOOD
  +SEESDAGGERS
  +NOSPLASHALERT
  MaxDropOffHeight 32
  MinMissileChance 200
  SeeSound "templar/sight"
  PainSound "templar/pain"
  DeathSound "templar/death"
  ActiveSound "templar/active"
  CrushPainSound "misc/pcrush"
  Tag "$TAG_TEMPLAR" // "TEMPLAR"
  HitObituary "$OB_TEMPLARHIT" // "%o was clawed by a Templar."
  Obituary "$OB_TEMPLAR" // "%o was vaporized by a Templar."
  DropItem "EnergyPod"

  action native A_TemplarAttack();

  States
  {
  Spawn:
    PGRD A 5 A_Look2
    Loop
    PGRD B 10
    Loop
    PGRD C 10
    Loop
    PGRD B 10 A_Wander
    Loop
  See:
    PGRD AABBCCDD 3 A_Chase
    Loop
  Melee:
    PGRD E 8 A_FaceTarget
    PGRD F 8 A_CustomMeleeAttack(random[ReaverMelee](1, 8)*3, "reaver/blade")
    Goto See
  Missile:
    PGRD G 8 Bright A_FaceTarget
    PGRD H 8 Bright A_TemplarAttack
    Goto See
  Pain:
    PGRD A 2
    PGRD A 2 A_Pain
    Goto See
  Death:
    PGRD I 4 A_TossGib
    PGRD J 4 A_Scream
    PGRD K 4 A_TossGib
    PGRD L 4 A_NoBlocking
    PGRD MN 4
    PGRD O 4 A_TossGib
    PGRD "PQRSTUVWXYZ[" 4
    PGRD "\" -1
    Stop
  }
}