Classes:Serpent

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do not need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it's actually harmful as it can cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
Stalker
Actor type Monster Game MiniHexenLogoIcon.png
DoomEd Number 121 Class Name Serpent
Spawn ID 6 Identifier T_WATERLURKER


Classes: Serpent
 →SerpentLeader
Stalkers are 'underwater' serpents in Hexen. They are often seen in slimy areas. If they get close, they attempt to claw you. Their leaders also have a ranged attack.

DECORATE definition

ACTOR Serpent
{
  Health 90
  PainChance 96
  Speed 12
  Radius 32
  Height 70
  Mass 0x7fffffff
  Monster
  -SHOOTABLE
  +NOBLOOD
  +CANTLEAVEFLOORPIC
  +NONSHOOTABLE
  +STAYMORPHED
  +DONTBLAST
  +NOTELEOTHER
  +INVISIBLE
  SeeSound "SerpentSight"
  AttackSound "SerpentAttack"
  PainSound "SerpentPain"
  DeathSound "SerpentDeath"
  HitObituary "$OB_SERPENTHIT" // "%o was mauled by a Stalker."

  action native A_SerpentHumpDecide();
  action native A_SerpentHide();
  action native A_SerpentCheckForAttack();
  action native A_SerpentSpawnGibs();
  action native A_SerpentUnHide();
  action native A_SerpentRaiseHump();
  action native A_SerpentLowerHump();
  action native A_SerpentChooseAttack();
  action native A_SerpentMeleeAttack();

  States
  {
  Spawn:
    SSPT H 10 A_Look
    Loop
  See:
    SSPT HH 1 A_Chase("Melee", "None", CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
    SSPT H 2 A_SerpentHumpDecide
    Loop
  Pain:
    SSPT L 5
    SSPT L 5 A_Pain
  Dive:
    SSDV ABC 4
    SSDV D 4 A_UnSetShootable
    SSDV E 3 A_PlaySoundEx("SerpentActive", "Body")
    SSDV F 3
    SSDV GH 4
    SSDV I 3
    SSDV J 3 A_SerpentHide
    Goto See
  Melee:
    SSPT A 1 A_UnHideThing
    SSPT A 1 A_PlaySoundEx("SerpentBirth", "Voice")
    SSPT B 3 A_SetShootable
    SSPT C 3
    SSPT D 4 A_SerpentCheckForAttack
    Goto Dive
  Death:
    SSPT O 4
    SSPT P 4 A_Scream
    SSPT Q 4 A_NoBlocking
    SSPT RSTUVWXYZ 4
    Stop
  XDeath:
    SSXD A 4
    SSXD B 4 A_SpawnItemEx("SerpentHead", 0, 0, 45)
    SSXD C 4 A_NoBlocking
    SSXD DE 4
    SSXD FG 3
    SSXD H 3 A_SerpentSpawnGibs
    Stop
  Ice:
    SSPT [ 5 A_FreezeDeath
    SSPT [ 1 A_FreezeDeathChunks
    Wait
  Walk:
    SSPT IJI 5 A_Chase("Attack", "None", CHF_NIGHTMAREFAST)
    SSPT J 5 A_SerpentCheckForAttack
    Goto Dive
  Hump:
    SSPT H 3 A_SerpentUnHide
    SSPT EFGEF 3 A_SerpentRaiseHump
    SSPT GEF 3
    SSPT GEFGE 3 A_SerpentLowerHump
    SSPT F 3 A_SerpentHide
    Goto See
  Attack:
    SSPT K 6 A_FaceTarget
    SSPT L 5 A_SerpentChooseAttack
    Goto MeleeAttack
  MeleeAttack:
    SSPT N 5 A_SerpentMeleeAttack
    Goto Dive
  }
}