Classes:Knight

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.
Undead warrior
Actor type Monster Game MiniHereticLogoIcon.png (Heretic)
DoomEd Number 64 Class Name Knight
Spawn ID 6 Identifier T_KNIGHT


Classes: Knight
 →KnightGhost

The skeletal undead warrior is a common foe throughout Heretic. It wears a magical axe that can throw ethereal throwing axes and sometimes the more powerful blood-dripping red axes. When defeated, it may yield ethereal arrows.

DECORATE definition

ACTOR Knight
{
  Health 200
  Radius 24
  Height 78
  Mass 150
  Speed 12
  PainChance 100
  Monster
  +FLOORCLIP
  SeeSound "hknight/sight"
  AttackSound "hknight/attack"
  PainSound "hknight/pain"
  DeathSound "hknight/death"
  ActiveSound "hknight/active"
  Obituary "$OB_BONEKNIGHT"
  HitObituary "$OB_BONEKNIGHTHIT"
  DropItem "CrossbowAmmo", 84, 5

  action native A_KnightAttack();

  States
  {
  Spawn:
    KNIG AB 10 A_Look
    Loop
  See:
    KNIG ABCD 4 A_Chase
    Loop
  Melee:
  Missile:
    KNIG E 10 A_FaceTarget
    KNIG F 8 A_FaceTarget
    KNIG G 8 A_KnightAttack
    KNIG E 10 A_FaceTarget
    KNIG F 8 A_FaceTarget
    KNIG G 8 A_KnightAttack
    Goto See
  Pain:
    KNIG H 3
    KNIG H 3 A_Pain
    Goto See
  Death:
    KNIG I 6
    KNIG J 6 A_Scream
    KNIG K 6
    KNIG L 6 A_NoBlocking
    KNIG MN 6
    KNIG O -1
    Stop
  }
}