Classes:Wraith

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.
Reiver
Actor type Monster Game MiniHexenLogoIcon.png (Hexen)
DoomEd Number 34 Class Name Wraith
Spawn ID 8 Identifier T_WRAITH


Classes: Wraith
 →WraithBuried
Reivers are enemies in Hexen. They only appear in the last hub. Those flying monsters look like the upper half of a human's body, and throw fireballs.

DECORATE definition

ACTOR Wraith
{
  Health 150
  PainChance 25
  Speed 11
  Height 55
  Mass 75
  Damage 10
  Monster
  +NOGRAVITY
  +DROPOFF
  +FLOAT
  +FLOORCLIP
  +TELESTOMP
  SeeSound "WraithSight"
  AttackSound "WraithAttack"
  PainSound "WraithPain"
  DeathSound "WraithDeath"
  ActiveSound "WraithActive"
  HitObituary "$OB_WRAITHHIT" // "%o had %p life stolen by a Reiver."
  Obituary "$OB_WRAITH" // "%o was charred by a Reiver."

  action native A_WraithInit();
  action native A_WraithChase();
  action native A_WraithFX3();
  action native A_WraithMelee();

  States
  {
  Spawn:
    WRTH A 10
    WRTH B 5 A_WraithInit
    Goto Look
  Look:
    WRTH AB 15 A_Look
    Loop
  See:
    WRTH ABCD 4 A_WraithChase
    Loop
  Pain:
    WRTH A 2
    WRTH H 6 A_Pain
    Goto See
  Melee:
    WRTH E 6 A_FaceTarget
    WRTH F 6 A_WraithFX3
    WRTH G 6 A_WraithMelee
    Goto See
  Missile:
    WRTH E 6 A_FaceTarget
    WRTH F 6
    WRTH G 6 A_CustomMissile("WraithFX1", 32, 0)
    Goto See
  Death:
    WRTH I 4
    WRTH J 4 A_Scream
    WRTH KL 4
    WRTH M 4 A_NoBlocking
    WRTH N 4 A_QueueCorpse
    WRTH O 4
    WRTH PQ 5
    WRTH R -1
    Stop
  XDeath:
    WRT2 A 5
    WRT2 B 5 A_Scream
    WRT2 CD 5
    WRT2 E 5 A_NoBlocking
    WRT2 F 5 A_QueueCorpse
    WRT2 G 5
    WRT2 H -1
    Stop
  Ice:
    WRT2 I 5 A_FreezeDeath
    WRT2 I 1 A_FreezeDeathChunks
    Wait
  }
}